MakeMyTrip Interview Question

An array question on Kadane's algorithm.