Question: Homework - 2 :A [ ] = { A , B , C , D , E , F , G , H } (

Homework -2:A[]={A, B , C, D , E, F ,G ,H }(8 elements)The task is to write a C++ program where the user constructs a balanced binary search treeusing the provided CHAR array. The program is expected to implement a generic balanced binary search tree code, leveraging concepts from the course materials.The command line interface should offer 4 options to the user:1. Insertion2. Deletion3. Display4. ExitThe program should allow the user to perform insertion and deletion operations on the given input array. After each successful insertion or deletion, the program should display the updated tree. Implementing the display functionality is considered a bonus; it can either print with slashes or simply display the parent and children as drawn on the board in the command line.Requirements:Use classes, do not use structs.Use and benefit from the codes given in the course.Make use of the provided code snippets from the course materials.The binary tree should be complete, meaning every level should be filled, except possibly for the last level, which should be filled from left to right. The excepted output shows an array.You can use the breadth first search algorithm code to display the array. when the deletion or addition operation is performed, if there is an empty node, let it write '0'.

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!