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
Shemrock Inc. is a brake pad manufacturing company. This company uses raw materials, such as carbon powder, iron, ash, and resin. It wants to develop an inventory management system

Write your own version of the strcmp function string_compare. Supply a main program that will test each of the 3 differing outcomes. int string_compare(char *s, cha

Selfcare Project:   Technology Used Strut Frame work, WAS 5.1, WPS 6.0, DB2, AJAX, Eclipse, Rational Application Developer 6 and  DB2 Selfcare is a big umbrella under whic

how to make a program using vb?seriously i don''t know

Consider the following LP problem: min x 1 +3 x2 +x 3 -x 4 s.t. x 1 +x 2 +x 3 +x 4 ≥ 0 x 1 +x 2 -x 3 -x 4 ≥ 1 x 2 , x 3 ≥ 0 x 1 , x 4 ≤ 0. 1. Unique pr

Write three functions, statistics, average, and sD as follows. The statistics function returns no value and has six parameters: four scores followed by their average and standard d

Expertsmind brings you unique solution in java assignments Multithreaded Programming Java provides built-in support for multithreaded selection. A multithreaded applicatio

I need help programming an arduino uno to scan an ean-8 student barcode and display their name and id on computer. This is a capstone project.

what is the c.

1- If the order of a (mod P) is 3, prove that the order of a+1 is 6. 2- Explain why the "simplifiled knapsack" code is not secure.