



'''simple docstring'''
from __future__ import annotations






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						# Checks if the entire collection has been sorted
						if len(UpperCAmelCase_							) <= 1 or n <= 1:
												return

						insert_next(UpperCAmelCase_  ,  n - 1							)
						rec_insertion_sort(UpperCAmelCase_  ,  n - 1							)






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						# Checks order between adjacent elements
						if index >= len(UpperCAmelCase_							) or collection[index - 1] <= collection[index]:
												return

						# Swaps adjacent elements since they are not in ascending order
						_UpperCamelCase :		str			    =       (
						    collection[index],
						    collection[index - 1],
						)

						insert_next(UpperCAmelCase_  ,  index + 1							)


if __name__ == "__main__":
					snake_case_			:     Dict  	=  input('Enter integers separated by spaces: ')
					snake_case_			:     list[int]  	=  [int(num) for num in numbers.split()]
					rec_insertion_sort(number_list, len(number_list))
					print(number_list)










'''simple docstring'''
from __future__ import annotations

import numpy as np






def A__   (					UpperCAmelCase_							):
						_UpperCamelCase    ,      _UpperCamelCase :		Optional[int]			    =       np.shape(UpperCAmelCase_							)
						if rows != columns:
												_UpperCamelCase :		Union[str, Any]			    =       (
												    '\'table\' has to be of square shaped array but got a '
												    f'{rows}x{columns} array:\n{table}'
												)
												raise ValueError(UpperCAmelCase_							)

						_UpperCamelCase :		Optional[Any]			    =       np.zeros((rows, columns)							)
						_UpperCamelCase :		Tuple			    =       np.zeros((rows, columns)							)
						for i in range(UpperCAmelCase_							):
												for j in range(UpperCAmelCase_							):
																		_UpperCamelCase :		Optional[Any]			    =       sum(lower[i][k] * upper[k][j] for k in range(UpperCAmelCase_							)							)
																		if upper[j][j] == 0:
																								raise ArithmeticError('No LU decomposition exists'							)
																		_UpperCamelCase :		Optional[Any]			    =       (table[i][j] - total) / upper[j][j]
												_UpperCamelCase :		int			    =       1
												for j in range(UpperCAmelCase_  ,  UpperCAmelCase_							):
																		_UpperCamelCase :		Optional[int]			    =       sum(lower[i][k] * upper[k][j] for k in range(UpperCAmelCase_							)							)
																		_UpperCamelCase :		Tuple			    =       table[i][j] - total
						return lower, upper


if __name__ == "__main__":
					import doctest

					doctest.testmod()


