Goldman Sachs interview question

Find max sum of subarray for the given integer array.