two pointers
Applied AI interview questions tagged two pointers, across every topic.
10 questions · 0 unlocked for you
Concepts behind "two pointers"
The curriculum that explains the ideas these questions test.
Foundational
Two Pointers and Sliding Window: O(n) Array PatternsConverging pointers on a sorted array, and an expanding-contracting window with a running invariant. The two moves that replace an O(n^2) nested scan.💻 Coding & Engineering Craft
Foundational
Fast and Slow Pointers (Floyd's Cycle Detection)Fast and slow pointers run two cursors through a sequence at different speeds so geometry, not extra memory, reveals structure. The tortoise and hare detect a cycle, locate where it begins, and find the middle of a list in a single pass with O(1) extra space. Interviews probe this because it tests whether a candidate can trade a hash set for a pointer trick and prove the meeting actually happens.💻 Coding & Engineering Craft
