






"""simple docstring"""







def 							SCREAMING_SNAKE_CASE							(   lowerCamelCase_):

					for insert_index, insert_value in enumerate(collection[1:]):
										a__ 							=	insert_index
										while insert_index >= 0 and insert_value < collection[insert_index]:
															a__ 							=	collection[insert_index]
															insert_index -= 1
										if insert_index != temp_index:
															a__ 							=	insert_value
					return collection


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

	testmod()

	__a							:						Dict   							=			input('Enter numbers separated by a comma:\n').strip()
	__a							:						int   							=			[int(item) for item in user_input.split(',')]
	print(F'''{insertion_sort(unsorted) = }''')










"""simple docstring"""







from __future__ import annotations





def 							SCREAMING_SNAKE_CASE							(   lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_):

					# Base Case
					if counter == 0 or capacity == 0:
										return 0

					# If weight of the nth item is more than Knapsack of capacity,
					#   then this item cannot be included in the optimal solution,
					# else return the maximum of two cases:
					#   (1) nth item included
					#   (2) not included
					if weights[counter - 1] > capacity:
										return knapsack(lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  counter - 1)
					else:
										a__ 							=	capacity - weights[counter - 1]
										a__ 							=	values[counter - 1] + knapsack(
										    lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  counter - 1)
										a__ 							=	knapsack(lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  counter - 1)
										return max(lowerCamelCase_			,  lowerCamelCase_)


if __name__ == "__main__":
	import doctest

	doctest.testmod()


