Computer Science I / Dynamic Programming Intuition
Practice question · Multiple choice

Memoisation and tabulation both solve the same dynamic programming problems. When does the choice actually matter?

Hints
  1. Ask which approach computes a subproblem that no path ever needs.
  2. Consider a huge state space where only a thin slice is reachable from the input.
Show the answer

B. When only part of the state space is ever reached

Why

Tabulation fills everything; memoisation computes only what the recursion reaches. On a sparse state space that is the whole difference, and it runs the other way too, since tabulation avoids call overhead and stack depth. Neither dominates, which is why both are taught.

Read the lesson: Dynamic Programming Intuition →

Practise Dynamic Programming Intuition

The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Dynamic Programming Intuition