A B+ tree can contain a maximum of 7 pointers in a node. What is the minimum number of keys in leaves?

Category: QuestionsA B+ tree can contain a maximum of 7 pointers in a node. What is the minimum number of keys in leaves?
Editor">Editor Staff asked 5 months ago

A B+ tree can contain a maximum of 7 pointers in a node. What is the minimum number of keys in leaves?
 
(a) 6
 
(b) 3
 
(c) 4
 
(d) 7
 
My question is based upon B-Trees in portion B-Trees of Data Structures & Algorithms I
 
This question was addressed to me during an internship interview.

1 Answers
Editor">Editor Staff answered 5 months ago

The correct option is (b) 3
 
The best explanation: Maximum number of pointers in a node is 7, i.e. the order of the B+ -tree is 7. In a  B+ tree of order n each leaf node contains at most n – 1 key and at least ⌈(n − 1)/2⌉ keys. Therefore, a minimum number of keys each leaf can have = ⌈(7 – 1)/2⌉ = 3.


Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40702