# Minimum number of keys in any non-root node of a given B+ tree ?

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

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]

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

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