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
We want a program that will allow us to print a "grade list" of the students in a class. The program should loop, asking for a name, midterm score, and final score. It should th

a program that enter an alphabet from the user and compare it is vowel or not?


In the form of hypermedia documents, Web pages or materials accessed by the Internet can be located anywhere in the world. Regardless of where they originated, most of the Web d

Write a program that takes integer array of 8 elements from user and find the smallest element among them using pointers

1. use a small perl program and matching config file to retrieve and reformat the system time for a number of remote machines via snmp.  Readings should have a local timestamp for

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

#quFollow the my shell programming guidelines as in the other assignments. Write a shell script to send a customized mail message to the users listed on the command line by login (

Write a program to show ten buttons with five possible colors: red, green, orange, yellow, blue. When the user clicks on a button, its color must advance to the next color, or go b

Use an insertion sort to sort an array (sequence) of long word integers. The size of the list will appear just before the list itself. Use the same labels as in this example: LE