Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 02 · DSA · Choosing the attack · about 15 min to read

Play it as a journeyTutor comes with a plan

Capstone: Attack an Unseen Problem

Capstone Attack an Unseen Problem
Capstone Attack an Unseen Problem · Open board

The whole DSA shelf laid out as one flow: a judge that grades speed, a toolkit of structures, a set of strategies, and the process that reaches for each one in order.

Before you start. You’ve already met a judge for speed (Big-O), a shelf of structures to hold data, and a handful of strategies for attacking it, one lesson at a time. This lesson adds no new structure or trick. It’s the missing instruction sheet for reaching the right one when the problem in front of you has never been seen before.

Lesson 15 of 96 in DSA

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • Bell Labs, 1982: the puzzle before the code
  • The trap: a plan that needs memory that doesn’t exist
  • The pearl: presence, not value
  • The judge that ruled the trap out before it was tried
  • Naming the waste: every costly plan has a bottleneck
  • The checklist Bentley’s puzzle already followed
  • Reading complexity off the constraints
  • The method in action: Two Sum
  • The whole track, assembled

Terms it explains: brute force, bitmap, Big-O, bottleneck, Understand, try it by hand, state the obvious plan, name the waste, Check it, Only now, write it, 12, 20–25, 500, 5,000, 10⁶, sort, 10⁷–10⁸, hash, ≥ 10⁹, Two Sum, O(n²), repeated lookup, hash map, O(n) time, O(n) space, Judge, Toolkit, Strategy, Process, THE CONSTANT, sort-it-or-hash-it, verify, code and test, constant.

Review DSA