1,545 views
0 0 votes
Consider a B+ tree in which the maximum number of keys in a Internal node is 5 and maximum number of keys in a leaf node is 4. What is the minimum number of keys in any non-root node?

3 Answers

0 0 votes

In case of B+ trees

Use the Formula  [(ceil of (p/2)-1),p-1], to calculate the Minimum and maximum number keys in an internal node.

Here P is the Order of the Internal Nodes.

 

 

0 0 votes
it's impossible.in B+ tree order is the max no of keys present in leaf node and max child ptrs present in non-leaf nodes. so according to the q order is 4 and as order 4 max keys that can be present in any non-leaf node is 3 ..but your q says its 5 which is not possible.. it has to be less than 4
0 0 votes

Answer is 2


Given:

  1. B+ tree 
  2. Max no. of keys in the internal node is 5
  3. Max no. of keys in the leaf node is 4

Solution:

We know that the max child pointer in the internal node of the B+ tree


= max no of keys in internal node + 1

= 5 + 1  i.e  6

Hence the max order of B+ tree internal node = 6

 

 

Now for a given internal node of the B+ tree, the min order of any internal node

=  ceil (order / 2)

= ceil (6/2)

= 3

Now, if the min order is 3, then min number of keys would be 3-1 = 2

 

Position:
Show:

Related questions

1 1 vote
0 0 answers
797
797 views
newdreamz a1-z0 asked Jan 2, 2019
797 views
For range queries every B+ tree index requires less I/O than a full table scan.can anyone explain?
3 3 votes
2 answers 2 answers
3.4k
3.4k views
aditi19 asked Nov 23, 2018
3,387 views
what is the minimum and maximum number of keys for non-leaf nodes and leaf nodes for B+ Tree of order p?
1 1 vote
1 1 answer
694
694 views
Anshul Shankar asked Jan 6, 2018
694 views
To insert key into level L B/B+ tree maximum new nodes require to create?? And how?
1 1 vote
0 0 answers
214
214 views
Dknights asked Dec 2, 2024
214 views
Can someone please explain what will be the minimum and maximum comparisons for a key in Btree and B+Treeof order 4 for both.