from step 1. Example To insert the value "25" into this 2–3–4 tree: Begin at the root (10, 20) and descend towards the rightmost child (22, 24, 29). (Its interval (20, ∞) contains 25.) Node (22, 24, 29) is a 4-node, so its middle element 24 is pushed up into the parent node. The remaining 3-node (22, 29) is split into a pair of 2-nodes (22) and (29). Ascend back into the new parent (10, 20, 24). Descend towards the rightmost child (29). (Its interval (24, ∞) contains 25.) Node (29) has no leftmost child. (The child for interval (24, 29) is empty.) Stop here and insert value 25 into this node. Deletion The simplest possibility to delete an element is to just leave the element there and mark it as "deleted", adapting the previous algorithms so that deleted elements are ignored. Deleted elements can then be re-used by overwriting them when performing an insertion later. However, the drawback of this method is that the size of the tree does not decrease. If a large proportion of the elements of the tree are deleted, then the tree will become much larger than the current size of the stored elements, and the performance of other operations will be adversely affected by the deleted elements. When this is undesirable, the following algorithm can be followed to remove a value from the 2–3–4 tree: Find the element to be deleted. If the element is not in a leaf node, remember its location and continue searching until a leaf, which will contain the element's successor, is reached. The successor can be either the largest key that is smaller than the one to be removed, or the smallest key that is larger than the one to be removed. It is simplest to make adjustments to the tree from the top down such that the leaf node found is not a 2-node. That way, after the swap, there will not be an empty leaf node. If the element is in a 2-node leaf, just make the adjustments below. Make the following adjustments when a 2-node – except the root node – is encountered on the way to the leaf we want to remove: If a sibling on either side of this node is a 3-node or a 4-node (thus having more than 1 key), perform a rotation with that sibling: The key from the other sibling