in the B+ tree order of internal node and order of leaf node are different
order of internal node is maximum no of children
order of leaf node is maximum no of key-value pair in the leaf
in the question, it is given that
B+ tree with fan-out (the number of pointers per node) equal to 3
so from this, we can easily conclude that the order of the internal node is 3
and order of leaf node is 2 ( just think about it why it is 2 ?? you will get the answer )
for internal node
since order = 3, so we can have 2 key elements in a node this is not a problem but when we have 3 key then we have to split them
for leaf node
since order = 2, so we can have 2 key elements in a node with no problem but when we have 3 key then we have to split them
correction in the diagram: every leaf node will point to the next leaf node, by doing this we can observe the fanout of each node is 3
( now I am giving the answer of question which I had asked earlier )
Q: why the order of leaf node is 2?
it is because given fan-out (the number of pointers per node) equal to 3
one pointer point to next leaf and two-pointer point to the record means there are maximum two record pointer
and order of leaf node is the maximum number of key-value pair
so it is 2