Phase 19Days 102-113

Dynamic Programming

From recursion + memo to tabulation to space optimization across every major DP pattern

Phase Goal

The crown jewel: learn to define state, transition and base case for each DP family fast.

Progress

Day 102: DP foundations

Day 103: 2D & grid DP

Day 104: Subsequence DP — knapsack core

Day 105: Unbounded knapsack family

Day 106: String DP — part 1

Day 107: String DP — part 2

Day 108: DP on stocks

Day 109: DP on subsequences — LIS

Day 110: Partition DP (the MCM pattern)

Day 111: DP on squares & grids

Day 112: DP on trees (intro)

Day 113: DP mastery & recap

Phase Complete!

After this phase, you'll be able to:

  • DP foundations
  • 2D & grid DP
  • Subsequence DP — knapsack core
  • Unbounded knapsack family
  • String DP — part 1
  • String DP — part 2
  • DP on stocks
  • DP on subsequences — LIS

After Phase 19, explain a core invariant, reconstruct a solution after a delay, diagnose a bug, and solve one unlabelled variation. Repair a failed prerequisite before advancing; record help separately from independent work.