Ula interview question

One of the problem in the technical round: Largest Sum Contiguous Subarray