Google interview question

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