2-3-4 Trees
- Each node has one, two, or three keys
- All leaves are at the same level
- Each internal node has 1 key and 2 children, 2 keys and
3 children, or 3 keys and 4 children.
- Like 2-3 trees, 2-3-4 trees have worst case search,
insertion, and deletion performance of O(logN).
- Due to certain details of their structure it is generally a little less
work in a 2-3-4 tree to perform insertions and deletions, compared to a
2-3 tree.
- In particular the insertion algorithm splits all 4-nodes on the way down
throught the tree while searching for the insertion point, so that if the
leaf where the key is inserted needs to be split, the parent node is
guaranteed to have room for the key that is "promoted." Thus there is
never any need in a 2-3-4 tree to have a "cascade" of node splits going
up from a leaf along a path to the root.
- Although a 2_3_4 tree with N nodes generally has height less than a 2-3
tree with N nodes, that is not the advantage that it has over the 2-3
tree. The advantage is the greater ease in keeping the tree balanced.