Closed srinivasboga closed 1 month ago
Implementing Kadane's Algorithm to find the maximum subarray sum in a given array. With a time complexity of O(n).
[-2,1,-3,4,-1,2,1,-5,4]
6
[4,-1,2,1]
Summary:
Implementing Kadane's Algorithm to find the maximum subarray sum in a given array. With a time complexity of O(n).
Checklist:
Example Test Cases:
[-2,1,-3,4,-1,2,1,-5,4]
6
, as the maximum subarray is[4,-1,2,1]
.Additional Notes: