If you previously called any List methods through the dictionary reference, you'll have to modify this code, since List methods are not supported by TreeSet or HashSet. Consult your instructor if you encounter difficulties.
When you complete this change, run the program and record the time taken for the following cases:
- the time to do a 4-way search on the 8x8 grid using a TreeSet to store the words in the dictionary
- the time to do a 8-way search on the 4x4 grid using a TreeSet to store the words in the dictionary
Demonstration
You must demonstrate and submit your modified Word Search application before the end of lab.
Note: Performing a 4-way search on a 4x4 grid requires 27, 396 iterations if you limit word size to 3 to 15 characters. An 8-way search, on the other hand, requires 11,686,356 iterations. A 4-way search on an 8x8 grid requires about 30,508,688 iterations. On my PC, it takes about 35 seconds to perform this many recursive iterations without doing the actual searching.
After final exams are over and you have the entire summer to think about how smart you've become after taking CS2852 (be sure to remind your parents of this), you may want to try putting your computer to work doing an 8-way search on the 8x8 grid. Be aware that, in this case, it takes about 653,533,924,480 iterations.
Submit your java files containing the modifications from part 2 to Blackboard.