Do you know how to find if linked list has loop?

Submitted by: Muhammad
This question has bit of similarity with earlier algorithm and data structure interview question. I mean we can use two pointer approach to solve this problem. If we maintain two pointers, and we increment one pointer after processing two nodes and other after processing every node, we are likely to find a situation where both the pointers will be pointing to same node. This will only happen if linked list has loop.
Submitted by: Muhammad

Read Online Data Structure Linked list Job Interview Questions And Answers