Answered step by step
Verified Expert Solution
Question
1 Approved Answer
it's a data structure class using c++ class 220 ASSIGNMENT: BST Write a program in C++ to create a Binary Search tree (BST) of characters.
it's a data structure class using c++ class
220 ASSIGNMENT: BST Write a program in C++ to create a Binary Search tree (BST) of characters. The program will perform these operations: Insert node(s), Traverse Preorder, Search BST, Delete node, Leaf Count, Sibling of a node and Quit. Use the heard file similar to this #include iostream #ifndef BTH tdefine BT H using namespace std; class BT private: struct node char data; node left node right; 1; node* root public: /Constructor bool isEmpty() const { return root . NULL; } void insert(char); void print preorder); void preorderTrav(node); void searchBST (char); void deleteNode(char); int count(); int leafcount (node*): void nodeSibling(char); //Check for empty Insert item in B //Preorder traversing driver //Preorder traversing //searches BST for a specific node //Delete item in BST /count driver /Counts nunber of leaves in BS1T / /Finds sibling of a nade ST #endi f Use the following menu in your program MENU 1. Insert nodels) 2. Traverse Preorder 3. Search BST Delete node 5. Leaf Count 6. Sibling of a node 7. Quit Enter your choiceStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started