Arcesium Interview Question

In the second round I was asked to solve "maximum sum subarray " problem