Kadane's algorithm is used to find the maximum sum of a contiguous subarray. Array can consists of both positive and negative elements. Kadane's algorithm is based on the idea of looking for all positive contiguous subarray and find the maximum sum of a contiguous subarray.
Kadane's algorithm is used to find the maximum sum of a contiguous subarray. Array can consists of both positive and negative elements. Kadane's algorithm is based on the idea of looking for all positive contiguous subarray and find the maximum sum of a contiguous subarray.