

"""simple docstring"""




from __future__ import annotations
class      _UpperCAmelCase   :



	def __init__(  self     :       List[str]			,    _lowercase     :       Optional[Any]=None						):
		__UpperCAmelCase      		= data
		__UpperCAmelCase      		= None



	def __repr__(  self     :       Optional[Any]						):
		__UpperCAmelCase      		= []
		__UpperCAmelCase      		= self
		while temp:
			string_rep.append(F'''{temp.data}'''						)
			__UpperCAmelCase      		= temp.next
		return "->".join(_lowercase						)






def       lowercase__						(       snake_case_   :list    ):
	if not elements_list:
		raise Exception('''The Elements List is empty'''    )

	__UpperCAmelCase      		= __UpperCAmelCase      		= Node(elements_list[0]    )
	for i in range(1			,		len(snake_case_    )    ):
		__UpperCAmelCase      		= Node(elements_list[i]    )
		__UpperCAmelCase      		= current.next
	return head





def       lowercase__						(       snake_case_   :Node    ):
	if head_node is not None and isinstance(snake_case_			,		snake_case_    ):
		print_reverse(head_node.next    )
		print(head_node.data    )





def       lowercase__						(       ):
	from doctest import testmod

	testmod()

	__UpperCAmelCase      		= make_linked_list([14, 52, 14, 12, 43]    )
	print('''Linked List:'''    )
	print(snake_case_    )
	print('''Elements in Reverse:'''    )
	print_reverse(snake_case_    )


if __name__ == "__main__":
				main()








"""simple docstring"""





from __future__ import annotations



def   a    (     __UpperCAmelCase      :    list  )    ->							list:
						if len(__UpperCAmelCase  ) == 0:
												return []
						__magic_name__,			__magic_name__:	List[str]							=       min(__UpperCAmelCase  ), max(__UpperCAmelCase  )
						__magic_name__:	Optional[int]							=       int(max_value - min_value  ) + 1
						__magic_name__:	list[list]							=       [[] for _ in range(__UpperCAmelCase  )]

						for i in my_list:
												buckets[int(i - min_value  )].append(__UpperCAmelCase  )

						return [v for bucket in buckets for v in sorted(__UpperCAmelCase  )]


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

							testmod()
							assert bucket_sort([4, 5, 3, 2, 1]) == [1, 2, 3, 4, 5]
							assert bucket_sort([0, 1, -10, 15, 2, -2]) == [-10, -2, 0, 1, 2, 15]



