Skip to content
dsa450for five year olds

Interview problems,
explained like you are five.

447 problems from the classic 450 sheet. Each one is a short story, a moving drawing of the real data structure, and two ways to solve it in Java.

$learn --from arrays --to dp
Get started
Or follow the roadmap for your target company

01

A story

Every problem starts as something from a playground: a lunch line, a toy train, a family photo.

02

The real picture

Trees are drawn as trees, lists as linked boxes, graphs as dots and roads. Never squashed into a row.

03

Two ways

The simple way first, then the clever way, each with Java code and an animation you can step through.

04

The interview

Traps people fall into, and the follow up questions interviewers ask next.

Press play

Drawings that look like the real thing.

Here a waiting line visits five towns, ring by ring. Every animation on the site works like this: step forward, step back, or let it play. The colours always mean the same thing, and the key sits under each drawing.

See every kind of drawing

Meet the graph

01 / 04

graph
ABCDE0
queue
outinAfront

Five towns, six roads. Start at town A.

  • looking now
  • seen
  • done
  • answer
  • path
  • just added

Fifteen topics, in learning order

Start at the top. Each topic leans on the ones before it.

Browse by pattern instead
01

Array

36 problems

A row of numbered lockers. Things sitting side by side, each with a number on its door.

0/36
02

String

43 problems

Letters on a bead necklace. Words are rows of letters. Count them, flip them, match them.

0/43
03

Searching & Sorting

36 problems

Finding a page in a book. Sorted things let you jump to the middle and throw half away.

0/36
04

Matrix

10 problems

A chocolate bar of squares. Rows and columns, like a board game or a chocolate bar.

0/10
05

Linked List

36 problems

A toy train. Cars hooked one to the next. You only see the next car.

0/36
06

Stacks & Queues

38 problems

A pile of plates and a lunch line. Last in comes out first in a pile. First in comes out first in a line.

0/38
07

Bit Manipulation

10 problems

A row of light switches. Every number is a row of switches that are on or off.

0/10
08

Binary Trees

35 problems

A family tree. Each parent has at most two children, a left one and a right one.

0/35
09

Binary Search Trees

22 problems

A guessing game tree. Smaller things go left, bigger things go right. Every time.

0/22
10

Heap

18 problems

A line where the smallest kid is always first. A tree that always keeps the smallest (or biggest) thing on top.

0/18
11

Greedy

35 problems

Grabbing the best candy first. Take the best looking choice now, and never look back.

0/35
12

Backtracking

19 problems

Exploring a maze and walking back. Try a choice, go deeper, and step back when you hit a wall.

0/19
13

Trie

6 problems

A tree of letters. Words that start the same share the same branch.

0/6
14

Graph

43 problems

Towns and roads. Dots joined by lines. Any dot can connect to any other.

0/43
15

Dynamic Programming

60 problems

Writing answers on a chart so you never redo homework. Solve small versions once, write them down, build the big answer.

0/60