Question d’entretien chez Goldman Sachs

Find max sum of subarray for the given integer array.