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
Windows Card Space Windows Card Space (codenamed Info Card), is Windows now-canceled customer application for the Identification Met system. Card Place is an instance of a class of

The Maze Game from Laboratory 7 loads its maze directly in the program's code. This should be avoided as it requires the program to be recreated if the maze needs to be changed. In

Create a visualization (programming project) and demonstrate it in the class. The project should be related to distributed systems. (A distributed system consists of multiple auton

Design an object definition named Pet, which should have the following fields: name: The name field holds the name of a Pet type: The type field holds the type of anima

Play is as follows: 1.) Player places a bet a. Bet is on one of three choice i. "Player" will win ii. "Banker" will win iii. Tie between the "Player" and the "Banker

1 Real and 2 Complex Eigenvalues    From the real eigenvalue/vector pair, l 1 and ?h 1 e l1 t ?h 1 We find the other two solutions in identical manner which we did

Lazytown Constabulary are concerned that young people in the town are unaware of the sorts of crime that they might encounter in their daily lives and are concerned that they may b

What is .NET TECHNOLOGY? .NET technological innovation was presented by Enthusiasm, to get the industry from the SUN's Coffee. Few in the past, Enthusiasm had only VC++ and VB