B+ Tree
Deletion
- STEP 1 Find leaf L containing (key,pointer) entry to delete
- STEP 2 Remove entry from L
STEP 2a If L meets the "half full" criteria, then we're done.
STEP 2b Otherwise, L has too few data entries.
- STEP 3 If L's right sibling can spare an entry, then move smallest entry in right sibling to L
STEP 3a Else, if L's left sibling can spare an entry then move largest entry in left sibling to L
STEP 3b Else, merge L and a sibling
- STEP 4 If merging, then recursively deletes the entry (pointing toL or sibling) from the parent.
- STEP 5 Merge could propagate to root, decreasing height
Program
Output
|