Questions tagged [root]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
51 views

pset5 trie: What is the boolean-data value in the root node if the dictionary has one-letter words?

I think I understand how the children-nodes of a trie are supposed to work. But if the dictionary contains one-letter words like "a" and "I", what should the boolean-data value of the root node be? If ...
0
votes
1answer
77 views

pset5 root node not freed

It looks like my unload function is not working properly. Valgrind shows 0 errors, but when I print out the address of my root node, it is not NULL. Hence my unload function (which returns true if ...
1
vote
1answer
588 views

pset5 root node defitnion (trie)

I'm trying to figure out where/how to define the root node of my trie in dictionary.c. I have declared my struct node as follows: typedef struct node { bool is_word; struct node* children[27]...