You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print("Maximum Sub Array Sum Is" , maxSubArraySum(arr,len(arr)))
"""Output
The output of the above code will be as given below:
Maximum Sub Array Sum Is 6
Time Complexity
The time complexity of kadane’s algorithm for an array containing n integer element is O(n) as only one for loop is to be executed throughout the program. Similarly, the auxiliary space complexity of the algorithm is O(1).