How would you list words that are anagrams of each other?
I was asked this question when I applied for my current job.
orchestra can be rearrang
orchestra
Put all the letters in alphabetical order in the string (sorting algorithm) and then compare the resulting string.