I am on pset5 and have completed the check and load functions. However, with the unload function I am having trouble understanding how to visualize it. As suggested in the walkthrough, I tried to implement the recursion method but I do not understand how that can work. So, we are on the root node with 27 elements in the children array. We point at one of the elements and check if they are NULL. If not, then we apply recursion. What I do not understand is how do we reach the children array of the first children element of the root node with recursion? When we apply recursion, to me, it seems that we keep checking if the same element of the root node is NULL or not but how does that help since we need to reach inside the children element of all the subsequent nodes and free them?
I don't understand how a trie works. Please help
Naomi
- 7
- 4