I want the solution of a linked list problem...The problem is : I have a infinitely long Singly linked list and don't have any start and end pointer. There is a pointer p, pointing to a node somewhere in the linked list and i have to delete its previous node. Is it possible and if yes then how?
I am not sure what do ya mean by the fact infinitely long..... Otherwise ya can work on the lines of shabbir... check for a circular linked list.... that can be done by initialising two pointers and incrementing them at different interval...one at an increment of 1 other at an increment of 2... if they meet....linked list is circular.... then ya can go to the previous node or previous to previous node and complete ur stuff....