As part of a larger word puzzle game, we have been asked to construct a program that determines if two words are anagrams and finds the largest group of anagrams in a list of words. Two words are anagrams if they contain the same letters in the same frequency. For example, "alert" and "later" are anagrams.
Now that we know how to implement an insertion sort, we are eager to use sorting to solve these two problems: