Arrays & Strings

The six foundational patterns — Two Pointers, Sliding Window, Prefix Sums, Binary Search, Hashing, Intervals & Greedy.

1 min readInterview · DSA Patterns

These six patterns unlock roughly 40% of interview problems on their own. They share a common shape: an array or string, an O(n) or O(n log n) target complexity, and an invariant maintained as we sweep.

Learn them first.

Finished reading?

Mark it done to track your progress in Interview.

On this page

No Headings