What is Memoization?
An optimization technique that caches function results for given inputs, avoiding redundant computations for repeated calls.
Memoization stores the results of expensive function calls and returns the cached result when the same inputs occur again. In Python: @functools.lru_cache decorates a function to automatically memoize results.
Memoization is key to dynamic programming, where overlapping subproblems would otherwise cause exponential time complexity. Classic examples include Fibonacci numbers (O(2^n) → O(n)), pathfinding, and string matching. It trades memory for speed.