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?

  1. A.

    1

  2. B.

    2

  3. C.

    3

  4. 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.

Explore the full course: Niacl Ao It Specialist