[Python 3] Kadane's algorithm. Very-easy


#1
class Solution:
    # @param A : tuple of integers
    # @return an integer
    def maxSubArray(self, A):
        
        max_cur = max_global = A[0]
        
        for i in range(1,len(A)):
            max_cur = max(A[i], A[i]+max_cur)
            
            if max_cur > max_global:
                max_global = max_cur
                
        return max_global