Dynamic programming vocabulary

  • Memoization — top-down; cache recursive results; compute lazily
  • Tabulation — bottom-up; fill table iteratively from smallest subproblems
  • Recurrence — dp[i] = f(dp[i-1], ...); read: "how each state depends on previous states"
  • Base case — the smallest known value(s) the recurrence starts from
  • Space optimization — if dp[i] only needs dp[i-1], use two variables instead of an array

Question 0 of 5

A code review comment says: "This solution uses memoization to avoid recomputing subproblems." What does memoization mean?