Algorithms and Data Structures · Junior · Question 29 of 75

What is memoization?

Explanation

A memoized function stores results in a cache keyed by its arguments. It only works correctly for pure functions, whose result depends only on their arguments.

Further reading

Problem with a question

Algorithms and Data Structures · Junior · question 29

Test yourself

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

Take this quiz