Skip to main content
Back to track
Frontend Engineer

Algorithms & data structures

75 interview-style coding challenges, with tests and explained solutions.

1

Arrays & Hashing8 problems

The starting point: a hash map or set turns an O(n) search into O(1). Almost every later topic leans on this.

Beginner guide
2

Two Pointers3 problems

Two indices moving toward each other over a (usually sorted) array or string, instead of a nested loop.

Beginner guide
3

Sliding Window4 problems

Two pointers that bound a contiguous range: grow and shrink a window, with a hash map counting what is inside.

Beginner guide
4

Stack1 problem

Last in, first out: the tool for nesting and matching problems, like brackets.

Beginner guide
5

Throw away half the search space at every step for O(log n), even when the array is only partly sorted.

Beginner guide
6

Linked List6 problems

Pointer manipulation: reversing, merging, and fast & slow pointers.

Beginner guide
7

Trees11 problems

Recursion on trees: DFS, BFS, and what a binary search tree guarantees.

Beginner guide
8

Tries3 problems

A tree of characters for prefix search, built on what trees taught us.

Beginner guide
9

Heap / Priority Queue1 problem

O(log n) access to the smallest or largest item while data keeps arriving.

Beginner guide
10

Backtracking2 problems

Exhaustive search with DFS: build a candidate step by step and undo the step when it leads nowhere.

Beginner guide
11

Graphs6 problems

DFS and BFS on graphs and grids, cycle detection, and Union-Find.

Beginner guide
12

Advanced Graphs1 problem

Topological sort: an order that respects dependencies, when the graph itself is hidden in the input.

Beginner guide
13

1-D Dynamic Programming10 problems

Break a problem into overlapping subproblems and keep their answers in one array.

Beginner guide
14

2-D Dynamic Programming2 problems

The same idea when the state depends on two variables: a table instead of an array.

Beginner guide
15

Greedy2 problems

The best choice now leads to the best result overall. The hard part is knowing when that holds.

Beginner guide
16

Intervals5 problems

Sort by start, then handle overlaps in a single pass.

Beginner guide
17

Math & Geometry3 problems

In-place matrix manipulation: rotating, spiraling and marking.

Beginner guide
18

Bit Manipulation5 problems

Working on the bits themselves: XOR, masks and shifts.

Beginner guide