In the Remove
method:
- You don't check if the given
node
is null
. - Where is the code that performs the actual remove of the node?
It seems like it should be something like:
public void Remove(BNode node)
{
if (node == null)
{
return;
}
Remove(node.LeftNode);
Remove(node.RightNode);
}