7Vals interview question

Given an integer array with both positive and negative numbers, return a subarray whose elements' sum is maximum.