Question: Check if the node has a right sibling and it has < 2 < 2 d keys. If so , shift the rightmost key up
Check if the node has a right sibling and it has d keys. If so shift the rightmost key up to the parent node and the key from the parent node as the leftmost key of the right sibling. If the noderight sibling is not a leaf, we need to move pointers as well.
Check if the node has a left sibling and it has d keys. If so shift the leftmost key up to the parent node and the key from the parent node as the rightmost key of the left sibling. If the nodeleft sibling is not a leaf, we need to move pointers as well.
If both of the conditions above do not hold, split the node into two according to the median and insert a parent at the leaf. This is the same procedure as before.
The advantages of d
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
