Can someone show me how to write a statement that would not let the compiler crash when it is imputed a non existence number for deletion;
i have the complete code, i just need a statement that would make sure that the program doesn't crash when a number that is not in BST is imputed for deletion
i tried something like this
1 2 3 4
if (num != root->data)
{
return;
}
but it doesn't seem to work for Binary Tree even though it worked for Linked list
any help is appreciable