Given 2 BST $\texttt{A}$ and $\texttt{B}$, write a function that deletes from $\texttt{B}$ all the common elements with $\texttt{A}$.


Difficulty level
This exercise is mostly suitable for students
void delete_common(Btree *B, Btree A)
{
    if(A)
    {
        delete_bst_rec(B, A->data);
        delete_common(B, A->left);
        delete_common(B, A->right);
    }
}

Back to the list of exercises
Looking for a more challenging exercise, try this one !!
Bellman-Ford Algorithm