Indus Valley Partners Interview Question

Round 1 - Q.2 code for largest sum subarray.