Question: Suppose a binary - search tree has n keys and probabilities of searching all keys ( in the tree ) are equal. However, probability of
Suppose a binarysearch tree has n keys and probabilities of searching all keys in the tree are equal. However, probability of NOT finding a key depends on where the search ends, that is probability of a search ending to the right of the key ki and to the left of the key ki is denoted by li and ai aj for i j
a points Circle all correct answers for an optimal binary search tree.
i Since the probability of searching all keys are equal, an optimal binary search tree for these keys is always height balanced
ii Since the probabilities of all unsuccessful searches are NOT equal, an optimal binary search
tree for these keys is never height balanced.
iii. Since the probabilities of all unsuccessful searches are NOT equal, an optimal binary search
tree for these keys is sometimes height balanced.
iv None of the above.
b points Explain your one of your selections
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
