Infosys Interview Question

Maximum of a subarray in a given array. (Kadane's Problem) time complexity - O(N) Space Complexity - O(1)