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
Write down any four applications of the queues.                                                            Ans. A pp li cation of Queue is given below (i)  Queue is

Threaded Binary Tree : If a node in a binary tree is not having left or right child or it is a leaf node then that absence of child node is shown by the null pointers. The spac

What is a Binary Search Tree (BST)? A binary search tree B is a binary tree every node of which satisfies the three conditions: 1.  The value of the left-subtree of 'x' is le

The space-complexity of the algorithm is a constant. It just needs space of three integers m, n and t. Thus, the space complexity is O(1). The time complexity based on the loop

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

write an algorithm to find the average number of occurances of MECHANIL in an english passage

GIVE TRACE OF BINARY SEARCH ALGORITHM BY USING A SUITABLE EXAMPLE.

what do you understand by structured programming?explain with eg. top down and bottem up programming technique


Ask question #sdgsdgsdginimum 100 words accepted#