# Finding minimal degree for a B-Tree

We are given 44,000,000 elements. We want to store them in a B-Tree so that his height is 5 (no more than 5).
We are asked: “What is the minimal t we can choose?”

($$t$$ is the minimal degree, in each vertex that is not the root we have at least $$t-1$$ keys but no more than $$2t-1$$)

We have a debate whether the minimal $$t$$ for the minimal height is $$10$$ or $$30$$:

Some calculated as so: $$5 = \log_t(22,000,000)$$
which gives us $$t \approx 29.4$$ and so $$t = 30$$

However then a some good questions were asked whether we know the inserting order or not, if we know then it may be $$t=10$$ and if we do not it may be $$t=30$$

The TA answered that while we show that we can insert all the elements under the constraints, it is valid, the height should not be more than $$5$$. Given we know all the elements and now you create the tree, your task is to show how to build a B-Tree (the exact calculation for the minimal $$t$$)

We are stuck from here, we do not know which way is correct.
Thank you!