Interview Question

Technical Yahoo Interview Sunnyvale, CA

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

Tags:
linkedlist
Answer

Interview Answer

1 Answer

0

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 Question, Sign In with Facebook or Sign Up