CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Postorder traversal of a given binary search tree T produces the following sequence of keys

10, 9, 23, 22, 27, 25, 15, 50, 95, 60, 40, 29

Which one of the following sequences of keys can be the result of an inorder traversal of the tree T?

A
9, 10, 15 ,22, 23, 25, 27, 29, 40, 50, 60, 95
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
95, 50, 60, 40, 27, 23, 22, 25, 10, 0, 15, 29
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
29, 15, 9, 10, 25, 22, 23, 27, 40, 60, 50, 95
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
9, 10, 15, 22, 40, 50, 60, 95, 23, 25, 27, 29
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A 9, 10, 15 ,22, 23, 25, 27, 29, 40, 50, 60, 95
The inorder traversal of a binary search tree is always in the sorted order or increasing order of a given sequence so the inorder traversal of the tree T is 9, 10, 15, 22, 23, 25, 27, 29, 40, 50, 60, 55

flag
Suggest Corrections
thumbs-up
2
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Nuclear Energy
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon