<prompt> Unapewa safu. Tafuta sub-safu na jumla ya juu.  <response>: To find the sub-array with the maximum sum, you can use Kadanes algorithm. Here is how it works:1. Initialize two variables, max_so_far and max_ending_here, to the first element in the array.2. Loop through the array starting from the second element.3. For each element, add it to max_ending_here.4. If max_ending_here becomes negative, reset it to zero.5. If max_ending_here is greater than max_so_far, update max_so_far.6. After the loop, max_so_far will contain the maximum sum of any sub-array in the original array.Here is the code in Python:def max_subarray_sumarr: max_so_far max_ending_here arr0 for num in arr1:: max_ending_here maxnum, max_ending_here num max_so_far maxmax_so_far, max_ending_here return max_so_farYou can call this function with your array as an argument to get the maximum sum. 