Arrays & Strings
The patterns behind half of all interview questions.
Arrays and strings are where most interviews start. Master the workhorse patterns - two pointers, sliding window, prefix sums, and in-place manipulation - that turn brute-force O(n^2) solutions into clean O(n) ones.
Lessons in this stage
- 01
The Two-Pointer Pattern
IntermediateWalk a sorted array from both ends (or at two speeds) to solve pair-sum, dedupe, and reversal problems in one pass and O(1) space.
15 min - 02
The Sliding Window
AdvancedGrow and shrink a window over a sequence to answer 'best/longest/shortest subarray' questions in a single pass instead of re-scanning.
16 min - 03
Prefix Sums
IntermediatePrecompute running totals so any range-sum query becomes O(1) - the trick behind subarray-sum and equilibrium problems.
13 min - 04
In-Place Manipulation
IntermediateReverse, rotate, and rearrange arrays using O(1) extra space, and why interviewers love the constraint.
13 min - 05
String Essentials
IntermediateAnagrams, palindromes, and frequency counting - the string toolkit, plus why immutability makes StringBuilder your friend in a hot loop.
14 min