Search code examples
data-structuresb-tree

Number of nodes in a B tree


In a B tree with minimum degree t, each non leaf node other than root has at least t children and at most 2*t children. Suppose that the keys {1,2,3...,n} are inserted into an empty B tree with minimum degree 2 in the sequence 1,2,3.....,n. How many nodes does the final B tree have?

From what I have understood, I feel it would be n/t since minimum number of keys each node can have is k, and the total number of keys is n. Am I correct?? If not Tell me where am I going wrong and how should I do this?


Solution

  • The answer is (n-2)*log(n-2) with t=2