2-3-4 Tree Insertion and Deletion

(Carrano, p. 565-9)

Insertion — Avoid Parent Corrections

At each step of the traversal to insert, if you encounter a 4-node (n), split it.

Deletion — Avoid Parent Corrections

At each step of the traversal to delete (either to find the value or, for interior nodes, to find the in-order successor to replace that value), if you encounter a 2-node, amplify it to a 3-node or a 4-node:

Consequently when you get to the leaf where the deletion will be performed, the value can be deleting and leave a valid node.