Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 23988

The problem set for Week 5 will challenge you to apply what you've learned about pointers, memory management, file i/o and structs, creating more complex data structures (such as Hash Tables or Tries) and leveraging their power to write a lightning-fast spell check algorithm.

1 vote

Unload function pset5

You're out of bounds: for (int i = 0; i <= N; i++) // Runs N + 1 times
Fuelled_By_Coffee's user avatar
1 vote
Accepted

PSET 5 Load Function woes

When using fscanf do we need to iterate through what it is writing to the buffer to check for the null signifier so we can jump in and strcpy that buffer into our new node? No. fscanf will just …
Fuelled_By_Coffee's user avatar
1 vote
Accepted

Speller - unload is giving me 1000000 errors in valgrind

The load function works perfectly I'm afraid I'm gonna have to disagree. You're calling malloc twice when the list is empty. So that's one node per list that you can effectively never free, as the p …
Fuelled_By_Coffee's user avatar
1 vote
Accepted

Lab5 free_family function

The various branches are mutually exclusive. Only one of them will execute the way you've written it. But you want to free both the parents and the person. And why check for NULL here? else if(p->pare …
Fuelled_By_Coffee's user avatar
0 votes
Accepted

Lecture 5 Linked Lists: What's going on under the hood?

My understanding is that list is a pointer variable initialised without a value No. It's initialized to NULL. That's what the = NULL part does. A variable can't be initialized without a value. Initi …
Fuelled_By_Coffee's user avatar
1 vote

PSET 5 SPELLER - Passing Valgrind but not Check50

The bug is in your unload function. You return after cleaning up just 1 list. But you have 26 of them to get through. The outer loop is also out of bounds. You iterate up to N + 1 for some reason. // …
Fuelled_By_Coffee's user avatar