






# Algorithm for the pigeonhole sorting





def 			_SCREAMING_SNAKE_CASE						( __lowercase   :			Dict    )						->      Optional[int]:





    """simple docstring"""

    __A         =	min(__lowercase    )  # min() finds the minimum value
    __A         =	max(__lowercase    )  # max() finds the maximum value

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

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

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



def 			_SCREAMING_SNAKE_CASE						( )						->      str:





    """simple docstring"""

    __A         =	[8, 3, 2, 7, 4, 6, 8]
    pigeonhole_sort(__lowercase    )
    print("""Sorted order is:"""			,				""" """.join(__lowercase    )    )


if __name__ == "__main__":
  main()












from collections.abc import Sequence



def 			_SCREAMING_SNAKE_CASE						( __lowercase   :			Sequence[float]			,				__lowercase   :			float    )						->      float:





    """simple docstring"""

    return sum(c * (x**i) for i, c in enumerate(__lowercase    )    )



def 			_SCREAMING_SNAKE_CASE						( __lowercase   :			Sequence[float]			,				__lowercase   :			float    )						->      float:





    """simple docstring"""

    __A         =	0.0
    for coeff in reversed(__lowercase    ):
        __A         =	result * x + coeff
    return result


if __name__ == "__main__":
  __a      :       Dict				  =   (0.0, 0.0, 5.0, 9.3, 7.0)
  __a      :       Optional[Any]				  =   1_0.0
  print(evaluate_poly(poly, x))
  print(horner(poly, x))




