List Cycle

Given a linked list, return the node where the cycle begins. If there is no cycle, return null.

Try solving it using constant additional space.

Example :

Input : 

                  ______
                 |     |
                 \/    |
        1 -> 2 -> 3 -> 4

Return the node corresponding to node 3. 
Interview Code Editor
Hints
  • Hint 1
  • Solution Approach
  • Complete Solution
7079 successful submissions.
Asked In:
  • Amazon
  • Microsoft
  • NetApp
Click here to jump start your coding interview preparation