Welcome, %1$s. Please login or register.

December 14, 2017, 06:16:12 AM
: 1
: Delete a node!  ( 1542 )
« : May 18, 2007, 11:54:23 PM From Prateek»



Delete a node!


In a singly linked list, delete a node pointed by a pointer P, provided P is not the last node of the list.
Note: No other pointer to any node is given!

 
Liked It? Share it!

              


« #1 : May 19, 2007, 12:05:17 AM From Poonam»

1.   Let the next node of P be Q.
2.   Copy the contents of Q to P.
3.   Delete Q. ( P->next = Q->next; free(Q); )

: 1
« previous next »

 

Best RatedList All>>



Latest
Random



SMF 2.0.10 | SMF © 2015, Simple Machines | Contact Webmaster | OnlineFunDb.com © 2009/10 | Legal Disclaimer