Skip to content

Getting Started

This packet has two halves that work together:

  • This web site is your reference shelf — browse every algorithm, concept module, reference sheet, the decision tree, and the printable PDF. Read it when you need to look something up or refresh a pattern.
  • The local CLI is your gymjust challenge strips a solution down to its signature and docstring so you re-implement it from scratch, with tests as your spotter.

Read on the site, drill in the terminal. Active recall is where the learning actually happens; the site is there to unstick you, not to read passively.


1. One-time local setup

You only need the CLI for the drill loop. Everything is pinned by a Nix flake and synced with uv, so setup is one command.

direnv (recommended)

The repo ships a .envrc that loads the flake automatically:

direnv allow

The first time, this drops you into the Nix devshell, creates a .venv with Python 3.14, and runs uv sync --all-extras. After that, cd-ing into the repo activates the environment automatically — no manual step. Tools provided by the shell: python, uv, just, watchexec, tectonic, and pandoc.

nix develop (no direnv)

If you do not use direnv, enter the devshell by hand:

nix develop --impure

Same result — venv created, deps synced, tools on PATH. Re-run it each time you open a new shell.

uv only (no Nix)

If you cannot run Nix, you need Python 3.14+ and uv on your own, then:

uv sync --all-extras

For PDF generation you will also need tectonic and pandoc; for watch mode you need watchexec. The Nix devshell is the supported path because it pins all of these for you.


2. The daily drill loop

Each problem is one tight cycle. Run it in a terminal next to your editor.

Diagram — rendered as source; see the source page for the visual.
flowchart LR
    A["just challenge<br/>topic problem"] --> B["implement from<br/>signature + docstring"]
    B --> C["just study topic<br/>(tests re-run on save)"]
    C -->|green| E["just challenge-done"]
    C -->|stuck| D["just solution<br/>(peek + study it)"]
    D --> E
    E --> A

The four commands, in order:

just challenge graphs dijkstra    # strip the solution → you implement it
just study graphs                 # watch mode: tests re-run on every save
just solution graphs dijkstra     # restore the reference solution if stuck
just challenge-done graphs dijkstra

What each one does:

CommandWhat happens
just challenge <topic> <problem>Backs up the real solution, strips the file to its signature + docstring, and prints the now-failing tests.
just study <topic>Runs pytest for that topic in watch mode — every save re-runs the tests instantly. Leave it open while you code.
just solution <topic> <problem>Restores the full reference implementation from the backup.
just challenge-done <topic> <problem>Records the problem (with today's date) in your progress log.
just challenge-progressPrints everything you have completed so far.

3. Daily cadence

The goal is interview pace and full coverage, not perfection on the first try.

HabitWhy
~25 min per problemThat is realistic interview pace. If you blow past it, stop and peek — a slow win still teaches the pattern.
Talk out loudNarrate your approach as you code. Interviews score communication, not just the final answer.
Pattern in 3 minIf you cannot name the pattern within ~3 minutes, open the decision tree before writing code.
Peek deliberatelyStuck after a genuine attempt? Run just solution, read and re-derive it, then re-challenge it tomorrow. Peeking to learn is fine; peeking to skip is not.
Mark honestlyRun just challenge-done and grade yourself. Re-drill your misses first the next day.

Grade each pass as you mark it complete:

MarkMeaning
:white_check_mark:Solved from memory, under 25 min
:warning:Needed a hint or ran slow
:x:Could not solve

Re-drill every :warning: and :x: first the next session. A practical weekly rhythm: one full pass of the Core 42 per day, leading with yesterday's misses, until the whole set is green from memory.


4. How the site and the CLI fit together

Source code, tests, and authored notes are the single source of truth; the docs and PDF are generated from them (see Source of Truth). That is why the two surfaces always agree.

When you want to…UseWhere
Re-implement a problem from scratchjust challenge / just studyterminal
Identify which pattern a prompt needsDecision treeweb
Plan a four-hour interview-prep blockInterview practice evidenceweb
See a full reference implementation + complexityAlgorithmsweb
Map a pattern to its implementationsCross-reference guideweb
Brush up on language/stdlib/system-designReference sheets and Conceptsweb
Track your streak and missesjust challenge-progressterminal

Run the site locally any time — it live-reloads as content changes:

just docs          # serve at http://127.0.0.1:8000 with live reload

5. Offline study with the printable PDF

For whiteboard prep, flights, or any non-electronic session, the entire packet compiles to a single printable booklet — decision trees, pattern keywords, selected notes, and every algorithm with its full implementation.

just packet        # regenerate booklet.pdf (and the copy embedded in these docs)

This rebuilds the LaTeX booklet from the current code and notes, compiles it with tectonic, and refreshes the version embedded on the site. You can grab the latest build straight from the web:

Download the PDF packet


Where to next

  • Start drilling


    Copy-paste blocks for all 42 core problems. Daily Drill

  • Pick the pattern


    Map a problem's signals to the right approach. Decision Tree

  • How it's built


    What is authored vs. generated, and why. Source of Truth

This page lives in git. Anyone can propose an edit. Edit this page View source

A reading surface for the DSA study packet. Content is tracked in git; every page links to its source.