Pergunta de entrevista da empresa 7Vals

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