Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

image text in transcribed

image text in transcribed

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 choice

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

What are negative messages? (Objective 1)

Answered: 1 week ago