How to find whether a linked list has a loop within it.
Anonimo
Use 2 pointers, varying the speeds of both. If at sometime they meet each other, that means there exists a loop, else if the reach the end of linked list that means there does not exists a loop.