I want to create a trie for this pset and need a nudge in the right direction. I have created a struct node and malloc space for the 'root' struct. Now I think I want to populate each node in the root struct with a letter of the alphabet and the apostrophe character. My question is, how can one accomplish this? My first thought was to use a for loop. Also, am I supposed to set each bool value to false initially? Finally, why is '/'' used for apostrophe?
so there are a bunch of ways to go through this, but I'd watch the walkthroughs and search CS50 exchange here for similar questions. Both of those provide a way of getting deeper into this question. Once you have an approach, I'd be happy to help with implementation.
For the bool values, you will want to set them to false, otherwise every time you hit the end of an input, if that character set is in your trie it will come back as a word whether or not it is. So if you have melon in you dictionary and it searches the world 'Mel', it will return true even if 'Mel' isn't in your dictionary.
Finally \ is the escape character as in \0 for the null terminator \' just prevents C from reading the single quote as the ending of a string.