Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in java that reads a list of numbers from the user and lets the user insert, delete, and search for values in

Write a program in java that reads a list of numbers from the user and lets the user
insert, delete, and search for values in the tree. The program should be menu
driven allowing for inserting, searching, and deleting from a binary search tree.
Inserting into the tree should allow for multiple inserts as follows.
----------------------------------------
Binary Search Tree Program
----------------------------------------
Make a choice...
1) Insert into tree.
2) Delete from tree.
3) Lookup Value.
Choice? 1
insert? 5
insert? 2
insert? 8
insert? 6
insert? 7
insert? 9
insert? 4
insert? 1
insert?
________________________
- Make a choice...
1. Insert into tree.
2. Delete from tree.
3. Lookup Value.
Choice? 3
Value? 8
Yes, 8 is in the tree.
--------------------------------
-Make a choice...
1. Insert into tree.
2. Delete from tree.
3. Lookup Value.
Choice? 2
Value? 55
has been deleted from the tree.
----------------------------------------
Make a choice...
1. Insert into tree.
2. Delete from tree.
3. Lookup Value.
Choice? 2
Value? 33
was not in the tree.

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_2

Step: 3

blur-text-image_3

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

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions

Question

What are the purposes of collection messages? (Objective 5)

Answered: 1 week ago