Skip to main content
2 votes
Accepted

STILL baffling check50 fail for speller.c!

On some versions of C, you cannot declare a global variable index if you include <string.h>. Apparently the check50 server has such a version (and the IDE does not). There is a comment about it ...
DinoCoderSaurus's user avatar
1 vote
Accepted

PSET5: Missing Words from Text and Memory Leaks

I'm surprised it didn't seg fault. The hash function generates results > N. That means that it's creating entries in the table[] array beyond it's range. When unload runs, it's not finding the ...
Cliff B's user avatar
  • 69.3k
1 vote
Accepted

Speller - not sure what's wrong

I believe the problem might be here: for (int i = 0; i < N; i++) { //temp points to what table points to temp = table[i]; //cursor points to what table points to cursor = table[i]; ...
Matías Gómez Seeber's user avatar
1 vote

PSET 5 Spell Checker - Error: Could not load dictionaries/large

Ugh! I figured it out. I was returning "false" from the load function. Can't believe I missed that! Resolved.
Richard K's user avatar
1 vote

Pset5 dictionary.c load and check: returning all words as misspelled?

The unload function is intended to do all the freeing. When this line free(ptr); executes in the load function it is freeing the root node. Why? last line feed of last word does this ptr = root;. ...
DinoCoderSaurus's user avatar
1 vote
Accepted

PSET5 All words misspelled (trie structure)

I see a couple of problems in the load function. For each new word in the dictionary, don't you want to start crawling the trie at the root node? When you create a new node here next->children[...
DinoCoderSaurus's user avatar
1 vote
Accepted

PSET 5: Dictionary.c, Trie structure, Check/Load, All words misspelled

You're on the right track - there is something wrong in load(). It's a subtle logic problem. When you process each character, the following line is processed: strider = strider->children[...
Cliff B's user avatar
  • 69.3k

Only top scored, non community-wiki answers of a minimum length are eligible