Linked Lists: Detect a Cycle

  • + 1 comment

    I think the fast pointer is guaranteed to cycle through the loop exactly exactly twice before it meets the slow pointer, so it's not really that bad.