Implementing Red-Black Tree in Go — Part 2: The Delete Operation
Too Long; Didn't Read
We figured out how the search and insert operation works in the red-black tree in the first part. In this part, we figure out the delete operation. The delete operation is more complicated than the insert operation. We must keep the original color of the deleted node. If the node to be deleted has two children, it is necessary to find a successor of this node.