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

The following numbers are inserted into an empty binary search tree in the given order:

10, 1, 3, 5, 15, 12, 16

What is the height of the binary search tree (the height is the maximum distance of a leaf node form the root)?

A
3
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
6
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
4
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A 3
The binary search tree is initially empty.


So the maximum height of BST = 3 [Distance from element 5 to root 10 is 3]

flag
Suggest Corrections
thumbs-up
1
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Three Sets Venn Diagram
QUANTITATIVE APTITUDE
Watch in App
Join BYJU'S Learning Program
CrossIcon