// TOPIC
#two-pointers
3 articles
◆◆IntermediateAmazonMeta
01Fast & Slow Pointers (Cycle Detection)
Fast and slow pointers detect linked list cycles, find the middle, and locate cycle starts in O(1) space — the most-asked linked list interview technique.
#linked-lists#two-pointers#cycle-detection
14 min◆◆IntermediateAmazonMeta
02The Two Pointers Pattern
A sorted array and an O(n²) instinct — two indices, moving in tandem, collapse it to O(n). Here is the pattern, the tell that signals it, and every problem variant you will see.
#two-pointers#arrays#sorting
11 min◆◆IntermediateAmazonGoogle
03The Sliding Window Pattern
Learn the sliding window technique: solve longest/shortest subarray and substring problems in O(n) with the expand-right, shrink-left template.
#sliding-window#two-pointers#arrays
11 min