if there is binary tree which one is the easiest way to
delete all child node?
Answer / q
class BinaryTreeNode
{
BinaryTreeNode *left,*right;
public:
//....
//....
~BinaryTreeNode()
{
if(left) delete left;
if(right) delete right;
}
};
delete root, all child nodes will be deleted recusively...
| Is This Answer Correct ? | 11 Yes | 5 No |
Specify different types of decision control statements?
Define a conversion constructor?
When volatile can be used?
What are structs in c++?
What are the weaknesses of C++?
What is oops in c++?
What is the best c++ compiler for windows 10?
Explain the volatile and mutable keywords.
How are the features of c++ different from c?
Is c++ an oop?
What are the main characteristics of C++ as a programming language?
What is std :: flush?