In a file which contains 1 million records and the order of the tree is 100, then what is the maximum number of nodes to be accessed if B+ tree index is used?
Explanation: We have to find the maximum no. of nodes to be accessed in B+ tree so we have to consider the minimum fill factor.
number of record = 1 million = 10^6 (Given )
order of b+tree= number of pointers per node = p = 100 (Given )
Minimum pointers per node =⌈ p/ 2⌉ = ⌈ 100/ 2⌉ = 50
number of nodes in last level of tree =10^6 / 50 = 2 * 10^4
Number of nodes in Second last level of tree = 2*10^4 / 50 = 400
Number of nodes in Third last level of tree = 400/50 =8
number of node in Forth last level of tree = 8/50 =1
The maximum no. of nodes to be accessed = number pf B+ tree levels = 4
Hence, option ( B ) is correct.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.