A B-tree index has a branching factor of 4 and stores 1000 key-value pairs.…
2024
A B-tree index has a branching factor of 4 and stores 1000 key-value pairs. What is the minimum height of the B-tree?
- A.
1
- B.
2
- C.
3
- D.
None of these
Attempted by 57 students.
Show answer & explanation
Correct answer: D
Branching factor = 4
Maximum children per node = 4
For a B-tree of height h, maximum keys ≈ 4^h
We need to store 1000 key-value pairs.
4⁴ = 256 (Not enough)
4⁵ = 1024 (Enough)
Therefore, the minimum height required is 5.