DSA Animator All problems →

37 DSA patterns that solve most interview problems

Most coding interview questions are a known pattern in disguise. Each guide below explains when the pattern applies, the template that solves it, the mistakes to avoid, and the problems to practise it on.

Learn a pattern here, then watch it run step by step in the animated problems, or revise it fast with the 2-minute revision videos.

Two Pointers 3

Sliding Window 2

Prefix Sum 1

Kadane's Algorithm 1

Hashing 1

Binary Search 2

Stack 3

Linked List 3

Heap 3

Trees 4

Breadth-First Search 2

Graphs 5

Backtracking 3

Greedy 2

Dynamic Programming 2