

# Algorithm for the pigeonhole sorting









def 			A_      (    _UpperCAmelCase    ):
						SCREAMING_SNAKE_CASE_: Optional[Any]  		=       min(_UpperCAmelCase    )  # min() finds the minimum value
						SCREAMING_SNAKE_CASE_: Tuple  		=       max(_UpperCAmelCase    )  # max() finds the maximum value

						SCREAMING_SNAKE_CASE_: str  		=       max_val - min_val + 1  # size is difference of max and min values plus one

						# list of pigeonholes of size equal to the variable size
						SCREAMING_SNAKE_CASE_: List[Any]  		=       [0] * size

						# Populate the pigeonholes.
						for x in a:
												assert isinstance(_UpperCAmelCase				,	_UpperCAmelCase    ), "integers only please"
												holes[x - min_val] += 1

						# Putting the elements back into the array in an order.
						SCREAMING_SNAKE_CASE_: int  		=       0
						for count in range(_UpperCAmelCase    ):
												while holes[count] > 0:
																		holes[count] -= 1
																		SCREAMING_SNAKE_CASE_: str  		=       count + min_val
																		i += 1







def 			A_      (    ):
						SCREAMING_SNAKE_CASE_: List[str]  		=       [8, 3, 2, 7, 4, 6, 8]
						pigeonhole_sort(_UpperCAmelCase    )
						print("Sorted order is:"				,	" ".join(_UpperCAmelCase    )    )


if __name__ == "__main__":
						main()













def      lowerCamelCase_						(				_UpperCamelCase ,				_UpperCamelCase )		->						str:






				"""simple docstring"""


				return "\n".join(
				    f'''{number} * {i} = {number * i}''' for i in range(1 ,				number_of_terms + 1 ) )


if __name__ == "__main__":
	print(multiplication_table(number=5, number_of_terms=1_0))
