Program for deleting nodes from the binary search tree, Programming Languages

Problem:

This assignment is about deleting nodes from the binary search tree. You need to use given sequence to construct a binary search tree and then delete some nodes from the tree. You need to use recursive and iterative methods to write the program. So there are two codes in this assignment.

Given sequence: 6 5 8 7 1 2 4 9 10 3 11 12

Each numbers should be separated by the "space"

Example:

Sequence: 2 3 1 4 5

Output:

Step1: the sequence based on the index of the binary search tree. If there is no node at the index, then output "x". In the above example, output will be:2 1 3 x x x 4 x x x x x x x 5

Step2:You enter the index which you want to delete and then output the sequence. If there is no node at the index, then output "error" In the above example, if you enter "6", then output will be 2 1 3 x x x 5 If you enter"3", then output will be error.

Posted Date: 2/21/2013 6:02:22 AM | Location : United States







Related Discussions:- Program for deleting nodes from the binary search tree, Assignment Help, Ask Question on Program for deleting nodes from the binary search tree, Get Answer, Expert's Help, Program for deleting nodes from the binary search tree Discussions

Write discussion on Program for deleting nodes from the binary search tree
Your posts are moderated
Related Questions
Implement a two-dimensional table in Prolog. Your program will contain: 1.  An insert_entry predicate that takes a table, row, column and an entry and inserts the entry at the g

.NET Windows Services But Enthusiasm has an amazing record of beginning overdue but finding up easily. This is real in situation of .NET too. Enthusiasm put their best men at

Memory Hierarchy for Linux Systems A cache line has one or more valid bit(s), tag entry and list of bytes in a block in one set of a cache, as shown below: If you were

A traveler wants to purchase a number of traveler''s checks, each having a set amount for four different currencies: Mexican pesos, Euro dollars, Swiss francs, and US dollars. A t

ASP.NET Support for AJAX and JavaScript IntelliSense IntelliSense for Enthusiasm JScript makes it accessible client-script selection components in the value manager in Vision Facil

Design an application that opens and analyses word files. Requirements: Create an application that analyses text documents. It should open a text file, read each word in

#questCustomers of a particular restaurant are described with some categories. If the categories indicate the customer is a senior citizen, or the customer works for the restaurant

Question 1 Discuss on UNIX kernel components 2 Explain process creation and process termination 3 When do a Deadlock occur? What are the Necessary Conditions for Deadlock

using UML 1- Identify primary classes 2- Scenario description 3- Class diagrams 4- Sequence diagrams

Write a program to draw the truck following figure. The program should buttons to provide When the truck runs left wheels must rotate in the correct direction. Rotating whe