


"""simple docstring"""







import numpy as np




def    UpperCAmelCase__       (lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_   ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE						   =				int(np.ceil((x_end - xa) / h   )   )
					__SCREAMING_SNAKE_CASE						   =				np.zeros((n + 1,)   )
					__SCREAMING_SNAKE_CASE						   =				ya
					__SCREAMING_SNAKE_CASE						   =				xa

					for k in range(lowerCAmelCase_   ):
										__SCREAMING_SNAKE_CASE						   =				f(lowerCAmelCase_  ,						y[k]   )
										__SCREAMING_SNAKE_CASE						   =				f(x + 0.5 * h  ,						y[k] + 0.5 * h * ka   )
										__SCREAMING_SNAKE_CASE						   =				f(x + 0.5 * h  ,						y[k] + 0.5 * h * ka   )
										__SCREAMING_SNAKE_CASE						   =				f(x + h  ,						y[k] + h * ka   )
										__SCREAMING_SNAKE_CASE						   =				y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
										x += h

					return y


if __name__ == "__main__":
		import doctest

		doctest.testmod()




"""simple docstring"""







from __future__ import annotations




def    UpperCAmelCase__       (lowerCAmelCase_  ,						lowerCAmelCase_ = None  ,						lowerCAmelCase_ = None   ):




					'''simple docstring'''


					if start is None:
										__SCREAMING_SNAKE_CASE						   =				0

					if end is None:
										__SCREAMING_SNAKE_CASE						   =				len(lowerCAmelCase_   ) - 1

					if start >= end:
										return

					__SCREAMING_SNAKE_CASE						   =				(start + end) // 2

					slowsort(lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_   )
					slowsort(lowerCAmelCase_  ,						mid + 1  ,						lowerCAmelCase_   )

					if sequence[end] < sequence[mid]:
										__SCREAMING_SNAKE_CASE   ,  __SCREAMING_SNAKE_CASE						   =				sequence[mid], sequence[end]

					slowsort(lowerCAmelCase_  ,						lowerCAmelCase_  ,						end - 1   )


if __name__ == "__main__":
		from doctest import testmod

		testmod()
