What is the function or purpose of Memoization?
- A. An optimization technique that stores the results of expensive function calls to avoid recomputing them. ✓
- B. A search algorithm that checks each element in a list sequentially until the target value is found.
- C. An algorithm that computes shortest paths from a single source vertex in a graph, even with negative edge weights.
- D. A method of analyzing algorithms that determines the average time or space cost over a sequence of operations.
Correct answer
A. An optimization technique that stores the results of expensive function calls to avoid recomputing them.
Explanation
Memoization refers to an optimization technique that stores the results of expensive function calls to avoid recomputing them.