Skip to content
← All pathways
Computer ScienceIntermediateRevision 1

Recursion, Backtracking & DP

Watch recursive calls branch, backtracking undo choices, and dynamic programming collapse repeated work into a reusable table.

4 stepsAbout 85 minutesTurn a recursive state space into a pruned search or dynamic-programming recurrence.

A lab, not a slideshow

How each chapter works

1 · Predict

Commit to what you think the system will do before pressing play.

2 · Observe

Change one variable and watch the state, algorithm, or model respond.

3 · Explain

State the invariant or principle, then prove it in the checkpoint.

Saved learning progress

Your ordered steps

Checking saved progress…

Chapter progress

0%

Next: Read a recursion tree

Continue
  1. Next suggested
    Step 1

    Step 1Experiment

    Read a recursion tree

    Predict first, change one input, then explain the state change you observe.

    Open simulation
  2. Step 2

    Step 2Experiment

    Explore backtracking with N-Queens

    Predict first, change one input, then explain the state change you observe.

    Open simulation
  3. Step 3

    Step 3Experiment

    Build an edit-distance table

    Predict first, change one input, then explain the state change you observe.

    Open simulation
  4. Step 4

    Step 4Prove

    Recursion and DP checkpoint

    Use the evidence from the chapter to pass a server-scored knowledge check.

    Take knowledge check