106k views
4 votes
Which of the following is not the self balancing binary search tree?

a. avl tree
b.red - black tree
c.splay tree
d.none of the above

1 Answer

3 votes

Final answer:

All options provided, AVL tree, Red-Black tree, and Splay tree, are indeed examples of self-balancing binary search trees. Thus, the correct answer is d. None of the above, as all mentioned trees maintain balance to ensure operations can be completed efficiently.

Step-by-step explanation:

The question is asking to identify which of the following options is not a self-balancing binary search tree. A self-balancing binary search tree is one that automatically maintains its balance as entries are inserted and deleted, in order to ensure that basic operations such as insertion, deletion, and lookup can be performed in O(log n) time where n is the number of nodes in the tree.

The options given are: a. AVL tree, b. Red-Black tree, c. Splay tree, and d. None of the above.

  • AVL tree - This is indeed a self-balancing binary search tree. Named after inventors Adelson-Velsky and Landis, AVL trees maintain balance by ensuring that the height difference between the left and right subtrees of any node is at most one.
  • Red-Black tree - This is also a self-balancing binary search tree. It enforces balance by coloring each node red or black and ensuring that certain properties are met that balance the tree's height.
  • Splay tree - Splay trees are also self-balancing binary search trees that move frequently accessed elements closer to the root using a process called splaying.

Given all the options listed represent types of self-balancing binary search trees, the correct answer to which is not a self-balancing binary search tree is d. None of the above.

User Shaunlim
by
8.1k points