Yahoo Interview Question: How to find a loop in a linke... | Glassdoor

Interview Question

Technical Yahoo Interview Sunnyvale, CA

How to find a loop in a linked list and write the code


Interview Answer

1 Answer


keep 2 pointers move 1 pointer by 1 step and other pointer by 2 steps if they meet there is loop

Interview Candidate on Jun 3, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.