Red-Black Example 2 Solution


Resulting tree from inserting: E A S Y Q U T I O N

A step-by-step for inserting the last letter, N:

Before inserting:

Insert N

Flip colors

Rotate right about S (promote O)

Rotate left about E (promote O again)

Re-color

Relationship with corresponding 2-3-4 tree