133k views
4 votes
what is the best way of deleting all the nodes in a binary tree pointed to by the root pointer? group of answer choices delete root; root

User Mastov
by
8.6k points

1 Answer

3 votes
Traverse the tree and delete each node individually.
User Adam Stanley
by
8.3k points