Two Pointer
Scanning a sequence with two moving indices.
1 subject · 2 topics · 1 cheatsheet
Subjects covering this category
1 subject- Subject · Intermediate to Advanced
Recognising which of the common problem-solving patterns an unseen coding problem needs, and solving it in Python, Java or TypeScript within the time an interview allows.
- Approach
- Array and Number Patterns
- Linked List Patterns
Cheatsheets
1 cheatsheet- Cheatsheet · Coding Interview Patterns
Fourteen coding interview patterns on one page: the property that points to each, what it costs, when it fails, and its loop in Python.
In Two Pointer itself
2 topics- Coding Interview Patterns
Two pointers: walking a sorted array from both ends, or rewriting it in place with a read and a write pointer, and the precondition each needs.
Intermediate to Advanced8 cards · 4 qnot started
- Coding Interview Patterns
Fast and slow pointers: two pointers moving at different speeds that find a list's middle, detect a cycle and locate where the cycle starts.
Intermediate to Advanced8 cards · 4 qnot started