Android & iPhone apps are coming soon. Log in for a plan and reminders made for you →

← All patterns

Pattern finder

Which pattern fits this problem?

Stuck on a problem? Answer a few questions about what it gives you and what it asks for, and land on the pattern, why it fits, the words that give it away, and problems to practise it on.

Question 1

What are you given?

Look at the function signature and the first lines of the problem.

Keys: 1–6 to answer · R to start over

All 31 patterns

Already know which one you want? Open it directly.

Graphs

Recursion

Trees

Linked lists

Heaps

Design

Stacks

Greedy

Sliding window

Arrays

Dynamic programming

Binary search

Two pointers

Math & bits