wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Let PRE, IN, POST, LVL denote the preorder, postorder, inorder and level order traversal respectively. Then which of the following combinations of traversals is not sufficient to uniquely construct a binary tree?

A
(PRE, IN)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
(POST, PRE)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
(POST, IN)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
(LVL, IN)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B (POST, PRE)
PRE and POST are not sufficient, as we need one of them to determine the ROOT, and the other is supposed to determine the left subtree respectively, but in case of PRE and POST, both give the information only about the root. So the correct choice is (d).

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Look at the World with a 90 Degree Tilt
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon