"""simple docstring"""





from collections.abc import Sequence





def        a_  (   _lowerCAmelCase						:				Sequence[float]     ,				_lowerCAmelCase						:				float  ):





       '''simple docstring'''

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





def        a_  (   _lowerCAmelCase						:				Sequence[float]     ,				_lowerCAmelCase						:				float  ):





       '''simple docstring'''

       lowercase__    :	int     					=			0.0
       for coeff in reversed(_lowerCAmelCase  ):
              lowercase__    :	List[Any]     					=			result * x + coeff
       return result


if __name__ == "__main__":
       _UpperCamelCase     :		int											=					(0.0, 0.0, 5.0, 9.3, 7.0)
       _UpperCamelCase     :		Dict											=					10.0
       print(evaluate_poly(poly, x))
       print(horner(poly, x))


"""simple docstring"""





def        a_  (   _lowerCAmelCase						:				str  ):





       '''simple docstring'''

       lowercase__    :	Any     					=			[0] * len(_lowerCAmelCase  )

       for i in range(1     ,				len(_lowerCAmelCase  )  ):
              # use last results for better performance - dynamic programming
              lowercase__    :	List[str]     					=			prefix_result[i - 1]
              while j > 0 and input_string[i] != input_string[j]:
                     lowercase__    :	Dict     					=			prefix_result[j - 1]

              if input_string[i] == input_string[j]:
                     j += 1
              lowercase__    :	Union[str, Any]     					=			j

       return prefix_result





def        a_  (   _lowerCAmelCase						:				str  ):





       '''simple docstring'''

       return max(prefix_function(_lowerCAmelCase  )  )


if __name__ == "__main__":
       import doctest

       doctest.testmod()

