search
Log In
0 votes
1.1k views

Suppose a binary tree has only three nodes A, B and C and you are given that the post-order traversal for the tree is B-A-C. The exact preorder traversal for the tree is.

  1. C-A-B
  2. A-B-C
  3. C-B-A
  4. A definite pre-order traversal cannot be determined from the information given
closed with the note: I got it
in DS
closed by
1.1k views
1

To say exact preorder for a given Post order may not be possible  above example explains it

0
Hmm right
0
Thank you, got it

Related questions

2 votes
3 answers
1
406 views
Let T be a rooted binary tree whose vertices are labelled with symbols a, b, c, d, e, f, g, h, i, j, k. Suppose the in-order and post-order traversals of T produce the following sequences. in-order: a, b, c, d, e, f, g, h, i, j, k post-order: a, c, b, e, f, h, j, k, i, g, d How many leaves does the tree have?
asked Nov 13, 2017 in DS Parshu gate 406 views
2 votes
3 answers
2
577 views
For a binary tree T, preorder traversal yields: 11,8,6,4,7,10,19,43,31,29,37,49 and inorder traversal yields: 4,6,7,8,10,11,19,29,31,37,43,49 The height of the T is ________________.
asked Nov 13, 2017 in DS Parshu gate 577 views
0 votes
1 answer
3
497 views
Given the preorder/postorder and inorder traversal of a binary tree, we can always construct a unique binary tree (I think so, correct me if I am wrong) Construct a binary tree with the nodes A, B, C such that its preorder traversal is ABC and its inorder traversal is CAB.
asked Nov 8, 2017 in DS humblefool 497 views
8 votes
5 answers
4
3.4k views
If the post order traversal gives ab -cd * + then the label of the nodes 1,2,3.. will be + , -, *, a,b,c,d a, -,b,+,c,*,d a,b,c,d,-,*,+ -,a,b,+,*,c,d
asked May 7, 2017 in DS sh!va 3.4k views
...