





# Algorithm for the pigeonhole sorting








def 	A_       (  _lowerCAmelCase  )		->				int:
 UpperCamelCase			:      List[str] 			=     min(_lowerCAmelCase  )  # min() finds the minimum value
 UpperCamelCase			:      List[Any] 			=     max(_lowerCAmelCase  )  # max() finds the maximum value

 UpperCamelCase			:      Union[str, Any] 			=     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
 UpperCamelCase			:      List[Any] 			=     [0] * size

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

 # Putting the elements back into the array in an order.
 UpperCamelCase			:      Union[str, Any] 			=     0
 for count in range(_lowerCAmelCase  ):
  while holes[count] > 0:
   holes[count] -= 1
   UpperCamelCase			:      Dict 			=     count + min_val
   i += 1



def 	A_       (  )		->				Optional[Any]:
 UpperCamelCase			:      Optional[Any] 			=     [8, 3, 2, 7, 4, 6, 8]
 pigeonhole_sort(_lowerCAmelCase  )
 print("Sorted order is:"							,     " ".join(_lowerCAmelCase  )  )


if __name__ == "__main__":
    main()








from ..utils import DummyObject, requires_backends



class       A__     ( metaclass=__snake_case    ):
      _UpperCAmelCase			:Tuple							=     ['note_seq']





      def __init__(				self ,							*A_ ,							**A_     ):
       '''simple docstring'''




       requires_backends(self ,							["note_seq"]     )





      @classmethod
      def  __UpperCamelCase(				cls ,							*A_ ,							**A_     ):
       '''simple docstring'''




       requires_backends(cls ,							["note_seq"]     )





      @classmethod
      def  __UpperCamelCase(				cls ,							*A_ ,							**A_     ):
       '''simple docstring'''




       requires_backends(cls ,							["note_seq"]     )
