← All sections

Dynamic Programming

The hardest type: memoization is born from mastered recursion. Closes the course.

0/7 lessons · exam: 0/30%

Lessons

  1. ✓01

    Recognizing DP problems

    Overlapping subproblems, memoization vs tabulation, and the states × cost complexity.

  2. ✓02

    Pattern 1: 1D DP (the recurrence)

    Building an answer from the previous ones — climbing stairs and the foundation of everything.

  3. ✓03

    Pattern 2: Include or exclude

    At each item, decide to take or skip — house robber and the boundary between greedy and DP.

  4. ✓04

    Pattern 3: Knapsack (coin change)

    Composing a target from reusable items — coin change and the unbounded knapsack.

  5. ✓05

    Pattern 4: Grid DP

    Filling a 2D table where each cell depends on its neighbors — unique paths.

  6. ✓06

    Pattern 5: DP on sequences and strings

    Comparing two sequences in a 2D table — LCS, and the family of string DP.

  7. ✓07

    Synthesis: which pattern to use?

    The section's (and course's) decision tree and the general quiz before the final exam.

🏁 FINAL EXAM

1 easy + 1 medium + 1 hard — unseen problems

With hidden test cases, just like the real LeetCode. This is where you confirm you can leave the section solving any problem of the topic.