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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!