Everyone Can Learn Program
中文 Start learning
Core · Algorithms Free to read

Data Structures and Algorithms tutorial

The patterns behind interview problems: complexity, two pointers, hash maps, stacks, binary search, recursion, graphs and dynamic programming, each with speed tests.

8 lessonsabout 16 h Learn first: Python from Zero

Then continue with: System Design

Learn it by doing

The interactive course has the same lessons with an editor next to them: run every example, answer the quizzes and solve exercises that are checked the moment you submit. Free to start, no sign-up.

Start the interactive course
1

Measure and scan

Count steps and solve list problems in one pass.
1 Big-O: counting stepsHow do you tell whether code will still be fast with a million items?2 Two pointers and sliding windowsHow do you solve list problems in one pass?
2

Look things up

Hash maps, sets, stacks and queues.
3 Hash maps and setsHow do you find things instantly instead of searching?4 Stacks and queuesWhen do you need a stack or a queue?
3

Divide and conquer

Binary search, recursion and merge sort.
5 Binary searchHow do you search a sorted list of a million items in 20 steps?6 Recursion and merge sortHow can a function solve a problem by calling itself?
4

Graphs and DP

Traverse graphs and reuse sub-answers.
7 Graphs: BFS and DFSHow do you explore a network of connected things?8 Dynamic programmingHow do you stop solving the same small problem over and over?