From 972118b712d06101b0ece5ca2223fe998cbc153f Mon Sep 17 00:00:00 2001 From: Connor Bottum Date: Tue, 5 Oct 2021 01:02:38 -0400 Subject: [PATCH] Altered --- sorts/recursive_mergesort_array.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sorts/recursive_mergesort_array.py b/sorts/recursive_mergesort_array.py index f714d02380cf..e02c02405565 100644 --- a/sorts/recursive_mergesort_array.py +++ b/sorts/recursive_mergesort_array.py @@ -38,23 +38,23 @@ def merge(arr: list[int]) -> list[int]: ): # Runs until the lowers size of the left and right are sorted. if left_array[left_index] < right_array[right_index]: arr[index] = left_array[left_index] - left_index = left_index + 1 + left_index += 1 else: arr[index] = right_array[right_index] - right_index = right_index + 1 - index = index + 1 + right_index += 1 + index += 1 while ( left_index < left_size ): # Adds the left over elements in the left half of the array arr[index] = left_array[left_index] - left_index = left_index + 1 - index = index + 1 + left_index += 1 + index += 1 while ( right_index < right_size ): # Adds the left over elements in the right half of the array arr[index] = right_array[right_index] - right_index = right_index + 1 - index = index + 1 + right_index += 1 + index += 1 return arr