but when you perform the flip and are both redand you get the errorparent and child are both red message don' press ins again in this situation is is and is as shown in figure figure inside grandchild on the way down to cure the red-red conflictyou must do the same two color changes and two rotations as in possibility change the color of (it' ignore the message that the root must be black change the color of ( rotate with ( as the topin the direction that raises (left in this examplethe result is shown in figure rotate with as the topin the direction that raises (right in this examplenow you can insert the color flip changes and to black as you insert it the result is shown in figure this concludes the description of how tree is kept red-black correctand therefore balancedduring the insertion process deletion as you may recallcoding for deletion in an ordinary binary search tree is considerably harder than for insertion the same is true in red-black treesbut in additionthe deletion process isas you might expectcomplicated by the need to restore red-black correctness after the node is removed in factthe deletion process is so complicated that many programmers sidestep it in various ways one approachas with ordinary binary treesis to mark node as deleted without actually deleting it search routine that finds the node then knows not to tell anyone about it this works in many situationsespecially if deletions are not common occurrence in any casewe're going to forgo discussion of the deletion process you can refer to appendix "further reading,if you want to pursue it