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.
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 drawingMeet the graph
01 / 04
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.
Array
36 problemsA row of numbered lockers. Things sitting side by side, each with a number on its door.
String
43 problemsLetters on a bead necklace. Words are rows of letters. Count them, flip them, match them.
Searching & Sorting
36 problemsFinding a page in a book. Sorted things let you jump to the middle and throw half away.
Matrix
10 problemsA chocolate bar of squares. Rows and columns, like a board game or a chocolate bar.
Linked List
36 problemsA toy train. Cars hooked one to the next. You only see the next car.
Stacks & Queues
38 problemsA pile of plates and a lunch line. Last in comes out first in a pile. First in comes out first in a line.
Bit Manipulation
10 problemsA row of light switches. Every number is a row of switches that are on or off.
Binary Trees
35 problemsA family tree. Each parent has at most two children, a left one and a right one.
Binary Search Trees
22 problemsA guessing game tree. Smaller things go left, bigger things go right. Every time.
Heap
18 problemsA line where the smallest kid is always first. A tree that always keeps the smallest (or biggest) thing on top.
Greedy
35 problemsGrabbing the best candy first. Take the best looking choice now, and never look back.
Backtracking
19 problemsExploring a maze and walking back. Try a choice, go deeper, and step back when you hit a wall.
Trie
6 problemsA tree of letters. Words that start the same share the same branch.
Graph
43 problemsTowns and roads. Dots joined by lines. Any dot can connect to any other.
Dynamic Programming
60 problemsWriting answers on a chart so you never redo homework. Solve small versions once, write them down, build the big answer.