A node size is 4096B. Node pointer size is 10B. Search key is 11B. Record pointer is 12B. What is the Max node pointers that can be stored in a non-leaf node of a B+ tree?
Correct Answer :
Solution :
The correct answer is 195.
In a B+ tree, non-leaf nodes (also known as internal nodes) are used for routing searches. They contain only search keys and node pointers (which point to child nodes). Unlike leaf nodes, non-leaf nodes do not store record pointers or actual data. Therefore, the record pointer size of 12 B is not used in this calculation.
Let us define the variables as follows:
- Let be the maximum number of node pointers (also called child pointers).
- A node with pointers will contain search keys.
- Node size = 4096 B
- Node pointer size = 10 B
- Search key size = 11 B
The total space occupied by the node pointers and search keys must be less than or equal to the total node size. This gives us the following inequality:
Substituting the given values into the inequality, we get:
Now, we simplify the expression step-by-step:
Add 11 to both sides of the inequality:
Divide by 21 to solve for :
Since the number of node pointers must be an integer, we take the floor of the value (round down to the nearest whole number):
Therefore, the maximum number of node pointers that can be stored in a non-leaf node is 195.
Access expert-curated educational resources and study materials—completely free.
Create, conduct, and manage professional online assessments with Mindyard. Perfect for teachers and institutes.
Copyright © 2026 Mindyard. All Rights Reserved.