Concept Flow - Detect Cycle in Linked List Floyd's Algorithm
Start: slow = head, fast = head
Move slow by 1 step
Move fast by 2 steps
Check if slow == fast?
NoāCheck if fast or fast.next is null?
Cycle detected
Two pointers move through the list at different speeds. If they meet, a cycle exists. If fast pointer reaches end, no cycle.
