Do the find and add operations on a binary search tree always require at most O(log 2 n) comparisons? If so, why? If not, why not?
What will be an ideal response?
The answer is ‘no’. If the tree is degenerate, meaning highly unbalanced, then a find or an add operation may
require more than O(log 2 n) comparisons. In the worst case, these operations will require a linear number (O(n)) of
comparisons.
Computer Science & Information Technology