Floyd's Cycle Finding Algorithm
Aug 26, 2024 · 3 min read · 🐙141. Linked List Cycle Intuition Imagine two runners running on a track at different speed. What happens when the track is actually a circle? Algorithm The space complexity can be reduced to O(1) by considering two pointers at different speed — a s...
Join discussion