yes you are right
Thank you,
Siddharam

On Thu, Aug 11, 2011 at 10:21 AM, Abhishek gupta <
mailatabhishekgu...@gmail.com> wrote:

> Q2). i think for second question it will be enough to just swap the data of
> current node to next node,
> and delete the next node.
> it will be like,
> //for swap
> int temp=current->data;
> current->data=current->next->data;
> current->next->data=temp;
>
> //for delete
> struct node *temp;
> temp=current->next;
> current->next=current->next->next;
> free(temp);
>
> i think it will be enough even in case of last node.
> correct me if i am wrong.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/N1elA8-W-iUJ.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to