




# Algorithm for the pigeonhole sorting



def    UpperCAmelCase_				( __UpperCAmelCase		:      Any				)   ->					List[str]:
      SCREAMING_SNAKE_CASE_      		=     min(__UpperCAmelCase				)  # min() finds the minimum value
      SCREAMING_SNAKE_CASE_      		=     max(__UpperCAmelCase				)  # max() finds the maximum value

      SCREAMING_SNAKE_CASE_      		=     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_      		=     [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_      		=     0
      for count in range(__UpperCAmelCase				):
            while holes[count] > 0:
                  holes[count] -= 1
                  SCREAMING_SNAKE_CASE_      		=     count + min_val
                  i += 1

def    UpperCAmelCase_				( )   ->					Optional[int]:
      SCREAMING_SNAKE_CASE_      		=     [8, 3, 2, 7, 4, 6, 8]
      pigeonhole_sort(__UpperCAmelCase				)
      print('Sorted order is:'     ,     ' '.join(__UpperCAmelCase				)				)


if __name__ == "__main__":
   main()







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available


SCREAMING_SNAKE_CASE__   :      Optional[int]				=		{"""tokenization_herbert""": ["""HerbertTokenizer"""]}

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					SCREAMING_SNAKE_CASE__   :      Optional[Any]				=		["""HerbertTokenizerFast"""]


if TYPE_CHECKING:
					from .tokenization_herbert import HerbertTokenizer

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_herbert_fast import HerbertTokenizerFast

else:
					import sys

					SCREAMING_SNAKE_CASE__   :      Union[str, Any]				=		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






