input: Write a python function to find the maximum sum of a contiguous subarray within a given array using Kadane's algorithm.
  assert maxSubArraySum([1, -2, 3, 4, -1, 2, 1, -5, 4]) == 9
  assert maxSubArraySum([-2, -3, 4, -1, -2, 1, 5, -3]) == 7
  assert maxSubArraySum([5, 4, -1, 7, 8]) == 23
output: def maxSubArraySum(arr):
      max_current = max_global = arr[0]
      
      for i in range(1, len(arr)):
          max_current = max(arr[i], max_current + arr[i])
          if max_current > max_global:
              max_global = max_current
              
      return max_global