Start here
Never written code? Perfect. Follow these steps in order, one at a time. Each one is small, and the button below always shows the next one. Your progress is saved in this browser.
Your first step
What code is, and how to run it
Short lesson, about 10 minutes.
Start →0 of 30 steps done
Part 1The basics
By the end you can read and write simple JavaScript. No experience needed.
- What code is, and how to run it (next)Short lesson, about 10 minutes
- Variables and typesShort lesson, about 10 minutes
- ArraysShort lesson, about 10 minutes
- StringsShort lesson, about 10 minutes
- Objects and MapsShort lesson, about 10 minutes
- Decisions and loopsShort lesson, about 10 minutes
- FunctionsShort lesson, about 10 minutes
- Big O, in picturesShort lesson, about 10 minutes
- RecursionShort lesson, about 10 minutes
- How to approach any problemShort lesson, about 10 minutes
Part 2Hashing and counting
Remember what you have seen in a Map, so you never search for it twice.
- Watch and learn hashing and countingRead the 30-second version, watch the animation, then press “Mark as complete” at the end of the lesson
- Solve your first problem: Pair to targetUse Break it down first. Hints are there if you're stuck
- Solve another problem: Spot a repeatUse Break it down first. Hints are there if you're stuck
- Learn it by heart: Remember as you goFour short steps, ending with writing it from memory
Part 3Two pointers
Walk through a list from both ends (or at two speeds) at once.
- Watch and learn two pointersRead the 30-second version, watch the animation, then press “Mark as complete” at the end of the lesson
- Solve your first problem: Mirror phraseUse Break it down first. Hints are there if you're stuck
- Solve another problem: Flip in placeUse Break it down first. Hints are there if you're stuck
- Learn it by heart: From both ends, towards the middleFour short steps, ending with writing it from memory
Part 4Sliding window
Keep a stretch of the list and slide it along instead of starting over.
- Watch and learn sliding windowRead the 30-second version, watch the animation, then press “Mark as complete” at the end of the lesson
- Solve your first problem: Best streakUse Break it down first. Hints are there if you're stuck
- Solve another problem: Longest unique stretchUse Break it down first. Hints are there if you're stuck
- Learn it by heart: A window of fixed sizeFour short steps, ending with writing it from memory
Part 5Binary search
Halve the search space with every guess.
- Watch and learn binary searchRead the 30-second version, watch the animation, then press “Mark as complete” at the end of the lesson
- Solve your first problem: Find the numberUse Break it down first. Hints are there if you're stuck
- Solve another problem: Where it would goUse Break it down first. Hints are there if you're stuck
- Learn it by heart: Find an item in a sorted listFour short steps, ending with writing it from memory
Part 6Stack
Keep the most recent unfinished thing on top, and finish it first.
- Watch and learn stackRead the 30-second version, watch the animation, then press “Mark as complete” at the end of the lesson
- Solve your first problem: Balanced bracketsUse Break it down first. Hints are there if you're stuck
- Solve another problem: Typing with backspaceUse Break it down first. Hints are there if you're stuck
- Learn it by heart: Matching pairsFour short steps, ending with writing it from memory