Want a Free Job Posting?

Buy a job posting today and the second one is on us. For a limited time only. Act Now.

Interview Question

Interview(Student Candidate) Bangalore (India)

How to find, whether a loop exists in linked list ?


Interview Answer

1 Answer


Take two pointers, one travels with an overhead of one node at a time, the other one two. When both meet, there is a loop

Interview Candidate on Feb 26, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.