Red-Black Trees

The URL /rbtree generates a random Red-Black Tree and allows you to add nodes to it. You can also generate a specific Red-Black Tree by specifying the nodes you want to insert. You can do this by using query parameters to specify a comma separated list of nodes, for e.g., /rbtree?nodes=2,7,11. Here's a summary of rules to insert a node into a Red-Black Tree.
After
Before

Add a Node

Add Node: