A friendly place to learn DSA
Algorithms click when you can watch them think.
Pick a problem and see it solved one step at a time, from the first idea that comes to mind to the fastest one, with the reason behind every Big-O.
Free · No sign-up · Works on your phone
63 could be anywhere between lo and hi: all 10 numbers.
This is running live. Every animation on the site is made by running the real algorithm.
What every page gives you
The problem, in plain words
No jargon wall. Just what's being asked, and the one question that unlocks it.
From brute force to best
Start with the idea anyone would try first, then see exactly what each better approach stops wasting.
Watch it run
Step forward, step back, slow it down, or type in your own numbers. The code highlights as it goes.
Big-O that makes sense
Every time and space complexity is worked out step by step, with a chart of how it grows.
A path you can follow
The topics, in the order most people learn them. Each one fills in as problems are added.
- 1Arrays & hashing2 problems
- 2Binary search1 problem
- 3Two pointers1 problem
- 4Sliding windowcoming up
- 5Stacks & queues1 problem
- 6Linked listscoming up
- 7Treescoming up
- 8Graphscoming up
- 9Dynamic programmingcoming up
- →System designlater
Recently added
New problems are added every day, newest first. 3 so far.
Friday 6 NovemberNew
- #1EasyTwo Sum
Find the two positions whose numbers add up to a target. Goes from checking every pair, to sorting, to remembering what you've already seen.
- #20EasyValid Parentheses
Check whether every bracket is closed by the right partner, in the right order. Goes from deleting matched pairs over and over to a single pass with a stack.
- #704EasyBinary Search
Find a number in a sorted list by halving the search range each step, from a linear scan to an iterative binary search and a recursive one, and why the recursive one uses more memory.
A notebook that grows every day
This isn't a giant course to get through. It's a notebook that grows every day. Come back tomorrow and there'll probably be something new to watch.
Start with Two Sum →