+1 vote
in Data Structures & Algorithms I by (110k points)
A B-tree of order 4 and of height 3 will have a maximum of _______ keys.

(a) 255

(b) 63

(c) 127

(d) 188

I would like to ask this question from B-Trees in portion B-Trees of Data Structures & Algorithms I

I had been asked this question during an interview for a job.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
The correct choice is (a) 255

Easiest explanation - A B-tree of order m of height h will have the maximum number of keys when all nodes are completely filled. So, the B-tree will have n = (m^h+1 – 1) keys in this situation. So, required number of maximum keys = 4^3+1 – 1 = 256 – 1 = 255.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.