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
I need someone to make an ER diagram.

,how to write matlab program for fast decoupled method

You get a contract to implement a simple Java application that process NBA team roster : your application has to read the NBA team roster from a text file and then print each playe

how do I get my actor to spin


Write a function lastfirst() that takes a list of strings as a parameter. Each string in the list has the format ''Last, First'' where Last is a last name and First is a first nam

Write a program that will allow the user to input the corners of a triangle. The program will draw small yellow circles for each input point, then draw the triangle and calculate t

This assignment will make use of arrays and functions to simulate a game. ASSIGNMENT DESCRIPTION This program will simulate part of the game of Yahtzee! The player will

Prepare an XML document that contains calendar information such as the following text describes: The calendar is owned by a person (e.g. John Smith) and has a few paragraphs tha

Need help with a cobol program.