Function to return maximum subarray sum of each connected component using Kadane 's Algorithm
def subarraySum ( arr , n ) : NEW_LINE INDENT maxSubarraySum = arr [ 0 ] ; NEW_LINE currentMax = arr [ 0 ] ; NEW_LINE DEDENT