Goldman Sachs Interview Question

Technical: dynamic programming, recursion, arrays