So I had interview today and interviewer asked me how I would go about, from a list of words, delete the anagrams. And by that he meant if the words 'eat' and 'ate' are on the list one of them would be deleted. As I was thinking out loud I came to adding up the ASCII value for each letter of the word and comparing, but that doesn't work. Then they reminded that you can assign whatever value I want, and after a little thought it dawned on me. Assign each letter a unique prime number and multiply all the 'letters' to get a unique value for that combination of letters. From this you would be able to compare the words to test whether or not they are anagrams.
My question is: Did I happen to think of a unique solution or is this something that is common knowledge? I am all worked up and trying to gauge how the interview went, though either way I think I did well because I had no prior knowledge of that.