This program takes in a list of 275k or so words from '/usr/share/dict/words' and loads them into HashSet. It then takes in a list of 1000 words (taken from the dictionary and are scrambled (vowel replacements, additional characters added, etc) that are in some way misspelled. The program find the best guess and prints it out. I wrote this program twice, first with pure arrays and second displayed below. I'm attempting to speed up my first implementation, but the program below is actually slower. It seems to hang on certain word inputs.

To find 1000 words the program below took roughly 247.361 seconds.

The same program using only ArrayLists took 41.485 seconds.

Any suggestions on how I can speed it up? Removing for loops, cutting down array usage, etc.