Index

Module 03 · DSAWorked, and deeper

Complexity Theory (when problems are hard)

When Problems Are Hard
When Problems Are Hard · Open board

Three cliffs, drawn side by side: a cost that calls smaller copies of itself, a cost that’s cheap almost every time and expensive once in a while, and a cliff nobody has ever found a way around.

Before you start. You already know how to read a cost off a line of code - count the loops, and see whether doubling the input doubles the work (Complexity & Big-O). This lesson is the three cases where that trick alone isn’t enough: a job that calls smaller copies of itself, a job that’s fast almost every time and slow once in a while, and a job nobody has ever managed to speed up at all.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

Ten cities, and you can check every possible route. Eleven, and you cannot. So what do you ship for the eleventh?

Set Cities on the map to 10, read The gap, then add one city and watch that number disappear.

Open The cliff at n = 11 →

Review DSA →

Saved in this browser, and to your account when you sign in.