Algorithm Insight (Floyd's Cycle Detection):Treat array as linked list: index i points to nums[i]. The duplicate creates a cycle.
Phase 1: Slow moves 1 step, fast moves 2 steps until they meet.
Phase 2: Reset slow to start, both move 1 step - they meet at cycle entrance (duplicate).