Source code for algorithms.searching.ternary_search

"""
    Ternary search
    ---------------
    Finds the maximum of unimodal function fn() within [left, right]
    To find the minimum, revert the if/else statement or revert the comparison.

    Time Complexity: O(log(n))

"""