
def      lowerCamelCase__       (       __lowerCAmelCase						:						int       ):




	"""simple docstring"""


	stooge(__lowerCAmelCase					,							0					,							len(__lowerCAmelCase       ) - 1       )
	return arr






def      lowerCamelCase__       (       __lowerCAmelCase						:						Tuple					,							__lowerCAmelCase						:						Tuple					,							__lowerCAmelCase						:						Dict       ):




	"""simple docstring"""


	if i >= h:
		return

	# If first element is smaller than the last then swap them
	if arr[i] > arr[h]:
		lowerCAmelCase_			,						lowerCAmelCase_      			=			arr[h], arr[i]

	# If there are more than 2 elements in the array
	if h - i + 1 > 2:
		lowerCAmelCase_      			=			(int)((h - i + 1) / 3       )

		# Recursively sort first 2/3 elements
		stooge(__lowerCAmelCase					,							__lowerCAmelCase					,							(h - t)       )

		# Recursively sort last 2/3 elements
		stooge(__lowerCAmelCase					,							i + t					,							(__lowerCAmelCase)       )

		# Recursively sort first 2/3 elements
		stooge(__lowerCAmelCase					,							__lowerCAmelCase					,							(h - t)       )


if __name__ == "__main__":
			_A     =  input("Enter numbers separated by a comma:\n").strip()
			_A     =  [int(item) for item in user_input.split(",")]
			print(stooge_sort(unsorted))





import functools






def      lowerCamelCase__       (       __lowerCAmelCase						:						str					,							__lowerCAmelCase						:						str       ):




			"""simple docstring"""


			lowerCAmelCase_      			=			len(__lowerCAmelCase       )
			lowerCAmelCase_      			=			len(__lowerCAmelCase       )

			@functools.cache
			def min_distance(__lowerCAmelCase						:						int					,							__lowerCAmelCase						:						int       ) -> int:
						# if first word index is overflow - delete all from the second word
						if indexa >= len_worda:
									return len_worda - indexa
						# if second word index is overflow - delete all from the first word
						if indexa >= len_worda:
									return len_worda - indexa
						lowerCAmelCase_      			=			int(worda[indexa] != worda[indexa]       )  # current letters not identical
						return min(
						    1 + min_distance(indexa + 1					,							__lowerCAmelCase       )					,							1 + min_distance(__lowerCAmelCase					,							indexa + 1       )					,							diff + min_distance(indexa + 1					,							indexa + 1       )					,							)

			return min_distance(0					,							0       )


if __name__ == "__main__":
			import doctest

			doctest.testmod()



