RedBlackTree II Chinese version address
Basic operation of red black trees
Insert
Insert a node into the red-black tree, which steps need to be performed?
- think of the red-black tree as a binary search tree and insert the node.
- Set this node to red.
- Modify the tree by rotating and recoloring it to make it a red-black tree again.