Consider the following 2-3-4 tree (i.e., B-tree with a minimum degree of two) in which each data item is a letter. The usual alphabetical ordering of letters is used in constructing the tree.
What is the result of inserting G in the above tree ?
Explanation: Since the given B tree is 2-3-4 tree, there can be at-most 4 children or 3 keys.
In B Tree insertion, we start from root and traverse till the leaf node where key is to be inserted. While traversing, if we find a a node which full, we split it. When we insert G, we find root itself is full, so we split it. When we come down to leftmost leaf, we find that the leaf is also full, so we split the leaf also.
Quiz of this Question
- GATE | GATE-CS-2016 (Set 2) | Question 31
- GATE | GATE-CS-2007 | Question 85
- GATE | GATE-CS-2002 | Question 48
- GATE | GATE-CS-2015 (Set 2) | Question 65
- GATE | GATE-CS-2015 (Set 3) | Question 56
- GATE | GATE CS 2018 | Question 65
- GATE | GATE CS 2018 | Question 64
- GATE | GATE CS 2018 | Question 63
- GATE | GATE CS 2018 | Question 62
- GATE | GATE CS 2018 | Question 61