Patterns

21 patterns grouped by family. Search by signal to practise the lookup you actually need in an interview.

Showing all 21 patterns

Array Sweeps

5 patterns

You move indices along a line.

2 patterns

Sorted input, or an O(log n) requirement.

Linear Helpers

3 patterns

Process a sequence with one helper structure.

Heap

1 patterns

Keep only the important few.

Trees & Graphs

5 patterns

Traverse a structure.

Recursion Family

4 patterns

Explore possibilities or optimize.

Hashmap (sidekick)

1 patterns

Always-on tool to turn O(n^2) into O(n).