binary trees unplug current from the rightchild field of its parentand set this field to point to successor unplug current' left child from currentand plug it into the leftchild field of successor steps and are handled in the getsuccessor(routinewhile and are carried out in delete(figure shows the connections affected by these four steps parent step step to be deleted step successor' step parent step step step successor step step cannot exist successor' right child abefore deletion figure bafter deletion deletion when the successor is the left child here' the code for these four steps successorparent leftchild successor rightchild successor rightchild delnode rightchild parent rightchild successor successor leftchild current leftchild(step could also refer to the left child of its parent the numbers in figure show the connections affected by the four steps step in effect replaces the successor with its right subtree step keeps the right child of the deleted node in its proper place (this happens automatically when the successor is the right child of the deleted nodesteps and are carried out in the if statement that ends the getsuccessor(method shown earlier here' that statement again