One way to think of red-black trees is as a representation of 2-4 trees. This demonstration shows the relationship: a red-black tree on the left corresponds to the 2-4 tree on the right. You can interactively add and remove items from the red-black tree and see the corresponding changes in the 2-4 tree:
|
|
Fast | Slow |
Value to insert: | ||||