Companies
Skip to content

Sheets

22 Essential DSA Patterns

Almost every interview problem is one of a small set of patterns wearing different clothes. This sheet covers 22 of them across 180 curated problems, ordered so each pattern builds on the last. Recognise the pattern and the solution follows.

Pattern-based prep is the fastest way through a DSA sheet: instead of grinding problems in random order, you drill sliding window, two pointers, fast & slow pointers, merge intervals, binary search on answer, backtracking, graphs and dynamic programming one at a time — each with enough repetitions that you recognise the shape on sight in an interview. Work top to bottom; later patterns lean on earlier ones (DP in particular reuses the recursion instincts from backtracking).

0%

0/180

Overall progress

0 / 180

0/30

Easy

0/118

Medium

0/32

Hard

Frequently asked

What are DSA patterns?

A pattern is the reusable shape behind a family of problems — the same technique wearing different problem statements. "Find the longest substring without repeating characters" and "find the smallest subarray with a given sum" read as unrelated but are both sliding window. Learning the 22 patterns on this sheet means recognising the shape on sight instead of solving each problem from scratch.

How many DSA patterns are there?

There is no official list, but most interview problems collapse into roughly twenty. This sheet uses 22 across 180 problems, which is enough coverage that a new interview problem is usually a variation on something here rather than genuinely unfamiliar.

Is learning patterns better than grinding random LeetCode problems?

For interview preparation, generally yes. Solving at random builds a collection of individual solutions; solving by pattern builds recognition, which is what you actually need under time pressure. Doing eight sliding-window problems in a row is what makes the ninth obvious — jumping between topics does not.

In what order should I learn the patterns?

Top to bottom as listed. The order is deliberate: later patterns lean on earlier ones, and dynamic programming in particular reuses the recursion instincts you build during backtracking. Skipping ahead to DP is the most common reason people find it impossible.

How long does this sheet take?

180 problems at roughly 25 minutes each — reading, solving and writing the approach down — is about 75 hours, or six to eight weeks at ten hours a week. It is the smallest complete set on the site, which is why it is the right choice when time is short.

Is this DSA patterns sheet free?

Yes. Every problem, the pattern grouping, the written guides and the progress tracking are free and need no account. Progress saves in your browser; signing in only adds syncing across devices.

Related