Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions