Review: Memoization
l Memoization is one way to deal with
overlapping subproblems
n After computing the solution to a subproblem,
store in a table
n Subsequent calls just do a table lookup
l Can modify recursive alg to use memoziation:
n There are mn subproblems
n Each wanted 3 times: compute once, lookup twice
n Running time: O(mn).  Running space: O(mn).