I would like to know the most efficient way to delete an entire binary search tree. also not to let any memory leak so having to check if all the nodes in the sub trees are deleted first.
I cant think of any efficient way besides post order traversal, deleting as you go. any suggestions or ideas?
See Question&Answers more detail:os