ASDA interview question

Find max subarray