The following cases apply to remove a node from a binary tree:
Leaf Node
To remove a leaf node, all that needs to be done is to assign null to its parent’s reference, and optionally free/delete it.
Node has one child
To remove, replace the node with its subtree.
Node has two children
When a node has two children, instead of replacing it with one of its children find its predecessor.
Example
void remove(Node *& r, K key){
Node *&handle = rFind(r, key);
if(handle)
}