Question: Given the BST code below. class BST { public: BST() { root = NULL; } ~BST() ; bool isEmpty(); void Inser t Node (int X
Given the BST code below.
| class BST {
public:
BST() { root = NULL; } ~BST() ; bool isEmpty(); void Insert Node(int X); // insert element in appropriate position Node* DeleteNode(int X); // delete node with data value=X private: Node *root; } |
Note that Node is declared as follow
| struct Node{ int data; Node* Right; Node* Left; }; |
Do the implementation of isEmpty() , InsertNode(int X) , DeleteNode(int X)!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
