diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 23:11:29 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 23:11:29 +0000 |
commit | 5098d095bce9d54111455d5de8d1a2b193f8544f (patch) | |
tree | 342b8f54ccfb071c00ccec1ece747ddf3abea92b /wk5/pset | |
parent | 7e2df501d800baf80441fea7179f05b51f6ceb42 (diff) |
Sun, Apr 28, 2024, 4:11 PM -07:00
Diffstat (limited to 'wk5/pset')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index d77c812..597573b 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -27,7 +27,15 @@ bool check(const char *word) // hash word to find bucket int head = hash(word); node *current = table(head); - + + while (current != NULL) + { + // check if this is the word + if (current->word == word) + + // move on to next node + current = current->next; + } return false; |