Hello all:
Is this solution correct
void remove(Node **node, int v)
{
while (*node) {
if ((*node)->value = v) {
Node *tmp = *node;
*node = (*node)->next;
free(tmp);
} else node = &(*node)->next;
}
}
If this code is correct, I have the following question:
why can we just free(tmp) without making the collection between
the previous node of tmp with the node after tmp
Thank you