2 votes 2 votes how to convert into inorder traversal if preorder traversal of binary tree is given in the problem ? exaplain using example. DS data-structures + – anurag_am asked Jun 15, 2015 anurag_am 6.0k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Digvijay Pandey commented Jun 15, 2015 reply Follow Share Binary tree or BST ?? 0 votes 0 votes anurag_am commented Jun 15, 2015 reply Follow Share i mentioned in the question binary tree , for BST it is not big thing to do as we know 0 votes 0 votes Digvijay Pandey commented Jun 15, 2015 reply Follow Share There are many binary tree having same pre order traversal .. then question is ambiguous.. bcoz for each tree der is different inorder traversal.. 2 votes 2 votes Please log in or register to add a comment.
0 votes 0 votes For Binary tree more than one inorder possible for same preorder.. Digvijay Pandey answered Jun 15, 2015 Digvijay Pandey comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes To identify a Binarytree uniquely minimun pre order + in order or post order + in order is needed . with only pre order , or only in order ,or only post order or pre order + post order we may can form more than one Binary tree . Pranay Datta 1 answered Jun 16, 2015 • edited Jun 16, 2015 by Pranay Datta 1 Pranay Datta 1 comment Share Follow See all 2 Comments See all 2 2 Comments reply Digvijay Pandey commented Jun 16, 2015 reply Follow Share For BST only preorder or only postorder is sufficient.. u may get inorder traversal of BST by arranging them in increasing order.. For binary tree we need inorder along with preorder or postorder for unique tree otherwise tree may not be unique.. 2 votes 2 votes Pranay Datta 1 commented Jun 16, 2015 reply Follow Share yes , i got confused between bst and binary tree . 0 votes 0 votes Please log in or register to add a comment.