Construction of a binary tree , Data Structure & Algorithms

Q. Construct a binary tree whose nodes in inorder and preorder are written as follows:

Inorder : 10, 15, 17, 18, 20, 25, 30, 35, 38, 40, 50

Preorder: 20, 15, 10, 18, 17, 30, 25, 40, 35, 38, 50                        

 

Ans:

Construction of a Binary tree whose nodes in inorder and preorder are written as follows:-

Inorder:- 10, 15, 17, 18, 20, 25, 30, 35, 38, 40, 50

 

Preorder:- 20, 15, 10, 18, 17, 30, 25, 40, 35, 38, 50

2477_Preorder.png

Posted Date: 7/10/2012 6:27:39 AM | Location : United States







Related Discussions:- Construction of a binary tree , Assignment Help, Ask Question on Construction of a binary tree , Get Answer, Expert's Help, Construction of a binary tree Discussions

Write discussion on Construction of a binary tree
Your posts are moderated
Related Questions
Q. Prove the hypothesis that "A tree having 'm' nodes has exactly (m-1) branches".      Ans: A tree having m number of nodes has exactly (m-1) branches Proof: A root

What is the difference between a grounded header link list and a circular header link list? A header linked list is a linked list which always having a special node, known as t

write a algorithsm in c to perform push and pop operations stastic implementation using array ?

Explain about the Abstract data type Abstract data type (ADT) A set of values (the carrier set) and operations on those values

Use a random number generator to create 10 numbers between 1 and 1000 and store them in 2 different arrays.  The first array should contain the numbers as they are generated.  The

Q. Define the terms data type and abstract data type. Comment upon the significance of both these.   Ans: We determine the total amount of memory to reserve by determining

Z-Buffer Algorithm Also known as the Depth-Buffer algorithm, this image-space method simply selects for  display the polygon or portion of a polygon that is nearest to the view

write an algorithm to sort given numbers in ascending order using bubble sort

Which sorting algorithm is easily adaptable to singly linked lists? Simple Insertion sor t is easily adabtable to singly linked list.

Explain CAM software CAD/CAM software has been recognized as an essential tool in the designing and manufacturing of a product due to its ability to depict the designs and tool