Traverse to the finest level of the tree (determined when is_leaf == true). Store the memory address of the path (e.g., the memory address of the current node).
Move up one level (may require storage of memory address of parent node).
Use the memory address saved in 1. to deallocate the object associated with the refined node and set the child pointer to NULL.
Repeat in the desired manner (until an appropriate level is attained, etc.).
is_leaf == true
). Store the memory address of the path (e.g., the memory address of the current node).NULL
.level
is attained, etc.).