



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			lowercase__   					=			min(SCREAMING_SNAKE_CASE__					)  # min() finds the minimum value
			lowercase__   					=			max(SCREAMING_SNAKE_CASE__					)  # max() finds the maximum value

			lowercase__   					=			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
			lowercase__   					=			[0] * size

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

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



def __lowerCAmelCase	(       ):
			lowercase__   					=			[8, 3, 2, 7, 4, 6, 8]
			pigeonhole_sort(SCREAMING_SNAKE_CASE__					)
			print("Sorted order is:"  ,					" ".join(SCREAMING_SNAKE_CASE__					)					)


if __name__ == "__main__":
							main()









from __future__ import annotations



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			return len(set(SCREAMING_SNAKE_CASE_					)					) == len(SCREAMING_SNAKE_CASE_					)


if __name__ == "__main__":
							import doctest

							doctest.testmod()




