Which of the following trees are height balanced?
A. Binary Search Tree
B. AVL Tree
C. Red-Black Tree
D. B Tree
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. B, C and D Only
Explanation
AVL trees, red-black trees and B-trees all keep their height O(log n). An ordinary binary search tree can degenerate into a chain.
More Data Structures and Algorithms questions
- Which of the following algorithms use Greedy strategy? A. Dijkstra's algorithm B. Kruskal's algorithm C. Huffman coding D. Bellman-Ford alg…
- Match List I with List II
- Match List I with List II
- Considering the binary tree shown (A has children B and C; C has children D and E; E has right child F; F has children G and H), what will…
- Match the LIST-I with LIST-II
- Which of the following algorithms are based on the Breadth First Search (BFS) ? A. Prim's algorithms B. Kruskal algorithms C. Dijkstra algo…