Microsoft Interview Question

Delete letters that appear more than twice in a string.