MiQ interview question

find subarray that has maximum sum within array