"""simple docstring"""


def 					__a   (		A      ):
     lowercase__				 =							min(A      )  # min() finds the minimum value
     lowercase__				 =							max(A      )  # 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(A    ,				A      ), "integers only please"
          holes[x - min_val] += 1

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







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


if __name__ == "__main__":
 main()





"""simple docstring"""


from __future__ import annotations







def 					__a   (		A    ,				A      ):






     '''simple docstring'''



     if partitions <= 0:
          raise ValueError("partitions must be a positive number!"      )
     if partitions > number_of_bytes:
          raise ValueError("partitions can not > number_of_bytes!"      )
     lowercase__				 =							number_of_bytes // partitions
     lowercase__				 =							[]
     for i in range(A      ):
          lowercase__				 =							i * bytes_per_partition + 1
          lowercase__				 =							(
              number_of_bytes if i == partitions - 1 else (i + 1) * bytes_per_partition
          )
          allocation_list.append(f'''{start_bytes}-{end_bytes}'''      )
     return allocation_list


if __name__ == "__main__":
 import doctest

 doctest.testmod()




