consider a b+ tree in which the miximum number of keys in a node is 5 what is the minimum number of keys in any non-root node?

options

a) 1

b) 2

c) 3

d) 4

my doubt is tree has order 6. For internal Nodes min will be Math.ceil(6/2) -1 = 2 and for External (leaf) nodes, min keys will be Math.floor(6/2) = 3.

so whats the answer 2 or 3 ??

Responses

pritam's picture

Here branching factor or capacity = 6

So, non-root can have minimum of \(\left \lceil \frac{6}{2} \right \rceil -1\)=  2  children [which is leaf in this case]

Hence, minimum number of key/s that a non-root can have = 2-1 =1  [for leaf node]

manijndl6's picture

sir y we are subtracting 1 from 2 for leaf node??

pritam's picture

2 is the number of children. Hence, the number of keys = number of children-1

Did not found what you are looking for, Ask your doubt or Help by your contribution

Enter your search keyword:

Search form

Wait!

Here is a chance to join biggest community of technical Students,
Tutors with FREE learning resources and so much more.
It takes less then 60 seconds.