[Solved] Free all elements in a tree [closed]
There are two ways you can do this, recursively or iteratively. The recursive approach is the simplest to code. You write a “free node” function that checks if the node has any descendants or siblings and calls the “free node” on each of them, then it frees the node it was called on. Performing this … Read more