B plus Tree · Data Structures
9 questions · asked in 7 of 27 years (2000–2026)
MCQ 6 · MSQ 1 · NAT 21-mark 7 · 2-mark 2
2000Questions per year2026
Questions 1–5 of 9
Consider the following tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the tree. Which of the following options(s) is/are CORRECT?
One or more options are correct.
Answer: (B), (D)
Since , the key goes to the last leaf . That leaf already has 3 keys, the maximum, so it overflows to and splits into and . The separator 22 goes up to the root.
The root is also full, so adding 22 gives four keys and the root splits too: and , with 19 moving up into a new root . The new root adds a level, so the height goes up by one.
Number of nodes: before, 1 root and 4 leaves, which is 5. After, there are 5 leaves, 2 internal nodes below the new root, and the new root, which is 8.
(A) is false: the leaf and the root both split. (B) is true. (C) is false: 5 nodes become 8. (D) is true.
(The first leaf is printed as 1, 4, 3 in the paper, out of order; this leaf is not touched by the insertion, so the answer does not depend on it.)
Answer: (B), (D)
The root is also full, so adding 22 gives four keys and the root splits too: and , with 19 moving up into a new root . The new root adds a level, so the height goes up by one.
Number of nodes: before, 1 root and 4 leaves, which is 5. After, there are 5 leaves, 2 internal nodes below the new root, and the new root, which is 8.
(A) is false: the leaf and the root both split. (B) is true. (C) is false: 5 nodes become 8. (D) is true.
(The first leaf is printed as 1, 4, 3 in the paper, out of order; this leaf is not touched by the insertion, so the answer does not depend on it.)
Answer: (B), (D)
In a -tree where each node can hold at most four key values, a root to leaf path consists of the following nodes:
The *-marked keys signify that these are data entries in a leaf.
Assume that a pointer between keys and points to a subtree containing keys in , and that when a leaf is created, the smallest key in it is copied up into its parent.
A record with key value 23 is inserted into the -tree.
The smallest key value in the parent of the leaf that contains 25* is __________. (Answer in integer)
The *-marked keys signify that these are data entries in a leaf.
Assume that a pointer between keys and points to a subtree containing keys in , and that when a leaf is created, the smallest key in it is copied up into its parent.
A record with key value 23 is inserted into the -tree.
The smallest key value in the parent of the leaf that contains 25* is __________. (Answer in integer)
Answer: 33
Leaf now covers the key range (between the separators of , and ). It is already full (at most keys per node).
Step 1 — leaf split: Inserting gives keys (), so splits into and . By the given rule, the smallest key of the new leaf, , is copied up into parent .
Step 2 — B overflows too: gets the new separator and becomes . That is keys, more than the limit of keys. is an internal node, so it splits by pushing up (not copying) its middle key (the rd of ) into the grandparent . So splits into and , and the child pointers are shared out correctly. The first child of now covers , which is exactly leaf , the one holding .
Step 3 — A takes the pushed-up key: had only keys (one empty slot), so it accepts without overflow: . No more splits are needed.
So the leaf with is , and its parent is now . The smallest key in this parent is .
Answer: 33
Step 1 — leaf split: Inserting gives keys (), so splits into and . By the given rule, the smallest key of the new leaf, , is copied up into parent .
Step 2 — B overflows too: gets the new separator and becomes . That is keys, more than the limit of keys. is an internal node, so it splits by pushing up (not copying) its middle key (the rd of ) into the grandparent . So splits into and , and the child pointers are shared out correctly. The first child of now covers , which is exactly leaf , the one holding .
Step 3 — A takes the pushed-up key: had only keys (one empty slot), so it accepts without overflow: . No more splits are needed.
So the leaf with is , and its parent is now . The smallest key in this parent is .
Answer: 33
In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?
Answer: (A)
Take a B+ tree of order . Every node, whether internal or leaf, must be at least half full. The only exception is the root.
The root may have as few as 2 children (or a single key, if it is also a leaf). Without this exception, a tree with only a few keys could not exist.
The other options are wrong: leaf nodes and non-root internal nodes must be at least half full, and the leftmost leaf has no special rule.
Answer: (A)
The root may have as few as 2 children (or a single key, if it is also a leaf). Without this exception, a tree with only a few keys could not exist.
The other options are wrong: leaf nodes and non-root internal nodes must be at least half full, and the leftmost leaf has no special rule.
Answer: (A)
B+ Trees are considered BALANCED because
Answer: (A)
In a B+ tree all leaf nodes are at the same depth, so every path from the root to a leaf has the same length. That is why it is called balanced.
The tree keeps this when it changes. A split or merge starts at a leaf and moves upward. The height changes only at the root: when the root splits, a new root is added above all leaves at once, and when the root is left with a single child, the tree loses a level at the top. So no leaf becomes deeper than another.
(B) is wrong because path lengths never differ, not even by 1. (C) and (D) talk about counts of children or records. Nodes need only be at least about half full, so a node with the minimum number of children can sit beside a full one, and the counts can differ by more than 1.
Answer: (A)
The tree keeps this when it changes. A split or merge starts at a leaf and moves upward. The height changes only at the root: when the root splits, a new root is added above all leaves at once, and when the root is left with a single child, the tree loses a level at the top. So no leaf becomes deeper than another.
(B) is wrong because path lengths never differ, not even by 1. (C) and (D) talk about counts of children or records. Nodes need only be at least about half full, so a node with the minimum number of children can sit beside a full one, and the counts can differ by more than 1.
Answer: (A)
With reference to the B+ tree index of order 1 shown below, the minimum number of nodes (including the Root node) that must be fetched in order to satisfy the following query:
"Get all records with a search key greater than or equal to 7 and less than 15"
is ____________.
"Get all records with a search key greater than or equal to 7 and less than 15"
is ____________.
Answer: 5
Look up key 7: start at the root (9) go to the left internal node (5) reach the leaf [5, 7].
Next, move along the leaf links to [9, 11] and then [13, 15]. The key 15 tells us to stop here.
Nodes fetched = root + 1 internal + 3 leaves = 5
Answer: 5
Next, move along the leaf links to [9, 11] and then [13, 15]. The key 15 tells us to stop here.
Nodes fetched = root + 1 internal + 3 leaves = 5
Answer: 5
Keep practising