USING THE C LANGUAGE (CANNOT BE C++ OR JAVA): Write a menu-driven program that offers the following menu items:              Create an integer binary tree Display the tree in in the console. Remove a specific node in the tree Display the tree in in the console. Search an item in the tree and show the visiting trace path   For the binary tree creation, you can address this by an automatic process via random number generation. You may ask user input for the number of nodes in the tree.  For the search feature, the program will print out the visiting trace path of that search at the end of the operation. If the item is not found, a message saying “the item is not found” is printed to the console instead.  Example of displaying a binary search tree (use the right representation for your submission):     Original Tree (see picture)    Display in your Console(see picture) Your output file should include the following: The tree that you created The tree after removing a node Both cases for Search function (found/not found)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

USING THE C LANGUAGE (CANNOT BE C++ OR JAVA): Write a menu-driven program that offers the following menu items:             

  1. Create an integer binary tree
  2. Display the tree in in the console.
  3. Remove a specific node in the tree
  4. Display the tree in in the console.
  5. Search an item in the tree and show the visiting trace path

 

For the binary tree creation, you can address this by an automatic process via random number generation. You may ask user input for the number of nodes in the tree. 

For the search feature, the program will print out the visiting trace path of that search at the end of the operation. If the item is not found, a message saying “the item is not found” is printed to the console instead. 

Example of displaying a binary search tree (use the right representation for your submission):

    Original Tree (see picture)    Display in your Console(see picture)

Your output file should include the following:

  1. The tree that you created
  2. The tree after removing a node
  3. Both cases for Search function (found/not found)
5
2
10
10
/\ /\
1 47 12
1 4 7 12
Original Tree
Display in your Console
Transcribed Image Text:5 2 10 10 /\ /\ 1 47 12 1 4 7 12 Original Tree Display in your Console
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY