I assume that the meat of the problem is the placement of permuted words into lists. That is, suppose we have a list with the following five letter words: tooth, tough, goose, baker, month, child, geese, brake. We would like baker and brake grouped together because brake is an anagram of baker. The easiest approach places the words in a dynamically linked list. We then compare the first word with each of the other words in the list. If all the letters match we put the two words into a linked list and, continue with the next word in the list. Each word that matches on all of the letters is added to the list. When we reach the end of the list, we check to see if there are words in it. If
there are words left, we proceed with the first word of the remaining list. If this word matches any word on the list, we create another linked list to hold these anagrams. If the word has no anagram, we remove it from the list and examine the next word on the remaining list. The search terminates when the list is empty.