Question: In c++ please 1. Write a program to implement a character-based Binary Search Tree (BST). Each node in the BST should be store student name

In c++ please

In c++ please 1. Write a program to implement a character-based Binary

Search Tree (BST). Each node in the BST should be store studentname (string) as follows: class Node{Iode prototype public: char ch;// this letteris taken from student first letter string studentName; Node *leftChild; Node *rightChild;}; For example, if a student's name is Adam then ch willbe equals to A. If the student's name is Lee then ch

1. Write a program to implement a character-based Binary Search Tree (BST). Each node in the BST should be store student name (string) as follows: class Node{Iode prototype public: char ch;// this letter is taken from student first letter string studentName; Node *leftChild; Node *rightChild; }; For example, if a student's name is Adam then ch will be equals to A. If the student's name is Lee then ch will be equal to L. The insertion of a node to the BST is based on the first letter of the student name. Your program should display the following: 1. Insert a node (base on ch) 2. Find a node (base on student name) 3. Delete a node (consider all three cases of delete) 4. Exit Step by step output: 1. Insert a node (base on ch) 2. Find a node (base on student name) 3. Delete a node (consider all three cases of delete) 4. Exit Please select an operation: 1 Please input a name: Lee Display tree L 1. Insert a node (base on ch) 2. Find a node (base on student name) 3. Delete a node (consider all three cases of delete) 4. Exit Please select an operation: 1 Please input a name: Adam Display tree L A 1. Insert a node (base on ch) Find a node (base on student name) 3. Delete a node (consider all three cases of delete) 4. Exit Please select an operation: 1 Please input a name: Michele Display tree L M M A 1. Insert a node (base on ch) 2. Find a node (base on student name) 3. Delete a node (consider all three cases of delete) 4. Exit Please select an operation: 3 Specify the node you want to delete: Adam Display tree M 1. Insert a node (base on ch) 2. Find a node (base on student name) 3. Delete a node (consider all three cases of delete) 4. Exit Please select an operation: 2 Please input a name: Adam Not found 1. Insert a node (base on ch) 2. Find a node (base on student name) 3. Delete a node (consider all three cases of delete) 4. Exit Please select an operation: 4 Exit

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!