If the key to be deleted is greater than the root's key, recurse on the right subtree.
If the key to be deleted is less than the root's key, recurse on the left subtree.
If the key is equal to the root's key, then the node to be deleted is found:
a. If the node is a leaf, delete it by setting it to null.
b. If the node has a right child, find the successor, replace the node's value with the successor's value, and delete the successor.
c. If the node has only a left child, find the predecessor, replace the node's value with the predecessor's value, and delete the predecessor.