1. In a given singly linked list if you are given only a node then how to delete this node?
As given in example if node three is given to you (no other information) then how to delete node 3 from this link list?
One answer is just to copy node 4 content to node 3 and node 5 content to node 4 and delete node 5.
Now, if you are given node 5 to delete...?????? In this case it is not possible to delete node 5.
There is even one more effective way to delete this node..just delete next node of the given one and copy the content of this node to the node meant to be deleted.
|Some useful links||Link|
|Cycle in Singly Linked List||http://ostermiller.org/find_loop_singly_linked_list.html|
|Linked List Operations||http://www.daniweb.com/code/snippet242.html|
|Data Structures and Searching Algorithms||http://oopweb.com/Algorithms/Documents/PLDS210/Volume/searching.html|
|C Data Structures and Algorithms||http://cprogramminglanguage.net/|
|Geaneric data structure in C||http://andreinc.net/2010/09/30/generic-data-structures-in-c/|
|Finding loop in a singly linked list||http://ostermiller.org/find_loop_singly_linked_list.html|
|Finding intersection node in two linked list||http://www.geeksforgeeks.org/archives/2405|
|Linked List Algoritms||http://www.velocityreviews.com/forums/t587346-where-do-two-linked-lists-merge.html|
Showing 11 items