


"""simple docstring"""



def     UpperCAmelCase    (					_lowercase   :      list[int]  )	->   list[int]:


	"""simple docstring"""




	if len(_lowercase  ) > 1:
		lowerCAmelCase_			       = len(_lowercase  ) // 2  # Finds the middle of the array
		lowerCAmelCase_			       = arr[
		    :middle_length
		]  # Creates an array of the elements in the first half.
		lowerCAmelCase_			       = arr[
		    middle_length:
		]  # Creates an array of the elements in the second half.
		lowerCAmelCase_			       = len(_lowercase  )
		lowerCAmelCase_			       = len(_lowercase  )
		merge(_lowercase  )  # Starts sorting the left.
		merge(_lowercase  )  # Starts sorting the right
		lowerCAmelCase_			       = 0  # Left Counter
		lowerCAmelCase_			       = 0  # Right Counter
		lowerCAmelCase_			       = 0  # Position Counter
		while (
		    left_index < left_size and right_index < right_size
		):  # Runs until the lowers size of the left and right are sorted.
			if left_array[left_index] < right_array[right_index]:
				lowerCAmelCase_			       = left_array[left_index]
				left_index += 1
			else:
				lowerCAmelCase_			       = right_array[right_index]
				right_index += 1
			index += 1
		while (
		    left_index < left_size
		):  # Adds the left over elements in the left half of the array
			lowerCAmelCase_			       = left_array[left_index]
			left_index += 1
			index += 1
		while (
		    right_index < right_size
		):  # Adds the left over elements in the right half of the array
			lowerCAmelCase_			       = right_array[right_index]
			right_index += 1
			index += 1
	return arr


if __name__ == "__main__":
		import doctest

		doctest.testmod()



"""simple docstring"""



lowercase_							 =       [0.485, 0.456, 0.406]
lowercase_							 =       [0.229, 0.224, 0.225]
lowercase_							 =       [0.5, 0.5, 0.5]
lowercase_							 =       [0.5, 0.5, 0.5]
lowercase_							 =       [0.4814_5466, 0.457_8275, 0.4082_1073]
lowercase_							 =       [0.2686_2954, 0.2613_0258, 0.2757_7711]