Goldman Sachs Interview Question

You are given an array of integers. Write a function to find the maximum sum of a contiguous subarray.