In a linked list U have to delete the Node XXX , XXX->link and XXX->info is given
void delete ( NODE XXX ){
----fill u r code here----
}
ANSWER IS THERE IN COMMENTs ,still u can add ur answer .
Subscribe to:
Post Comments (Atom)
This is the blog of my interest.(Chess,funny Tech,puzzle etc)
3 comments:
i had this question in my google interview
NODE *tmp = NULL;
//Incase x is the last node
if(x->next == NULL)
{
x = NULL;
}
else
{
tmp = x->next;
x->value = tmp->value;
x->next=tmp->next;
free(x) ;
}
Answer1 :
krupa's comment.
Post a Comment