Algorithms and Data Structures · Middle · Question 41 of 75

What is the difference between memoization and tabulation?

Explanation

Both compute each subproblem once. Top-down is often easier to write and computes only what's needed; bottom-up avoids deep recursion and makes memory optimizations easier, for example keeping only the last row.

Further reading

Problem with a question

Algorithms and Data Structures · Middle · question 41

Test yourself

Take the Algorithms and Data Structures · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz