Our implementation of a spell checker has no extra bells and whistles, however. Its only function is to verify if a word is misspelled or not, based on its existence in the program’s dictionary.
Most of the components for manipulating the data structures have already been written for you. Your primary job is to write the code for computing an appropriate hash value given an input string.
For this project, the dictionary is implemented as a hash table, as an instance of map ADT with the entries having string keys and no value.
The program will initially insert some user-specified words
into the hash table. Afterwards, the user can submit a string of words to be spell-checked. Any
words not found in the hash table will be flagged as “misspelled” and reported to the user.
To keep things simple, we will only consider separate chaining for collision handling. The hash table is represented as an array of linked lists, with each list representing a “bucket”.