Algorithms
October 12, 2023
Algorithms
October 12, 2023
Algorithms
October 12, 2023
Algorithms
October 12, 2023

Algorithms

Question 44

The numbers 1, 2, …. n are inserted in a binary search tree in some order. In the resulting tree, the right subtree of the root contains p nodes. The first number to be inserted in the tree must be

A
p
B
p + 1
C
n – p
D
n – p + 1
Question 44 Explanation: 
Total element = n
RST contains elements = p
Root contains = 1 element
1st contains = n – (p + 1) element

Root contains the value is n – p.
Correct Answer: C
Question 44 Explanation: 
Total element = n
RST contains elements = p
Root contains = 1 element
1st contains = n – (p + 1) element

Root contains the value is n – p.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!