[mod-- _Why_ can you not use tortoise and hare? <http://ostermiller.org/find_loop_singly_linked_list.html> --mod PN]
Hi All, Prob: There is a data structure of singly linked list which contains a millions of millions of node.And some where one of the pointer is corrupted which points to randomly some other memory location instead of pointing to the next memory location(i.e it is forming a cycle). How to detect it with a minimum traversal with optimum storage space. Note:Two Pointer Approach(i.e one slow pointer(move once) and one fast pointer(move twice) this method is not allowed. Regards, AbMan =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you [Non-text portions of this message have been removed]
