Google Interview Question

Solve a problem involving dynamic programming, such as finding the maximum subarray sum.