[removed code per academic honesty guidelines]
You're doing a hash table, right?
A hash table only works well if your individual table entries (whether you are storing them as a linked list or some kind of tree) contain as few words as possible. And the table entry with the most words dominates your
So to speed up the algorithm, you would have to have a large hash table (at least a few thousand entries for a large dictionary), and have a hash function that distributes the words evenly.