def memoized_coin_change(amount, denoms, denoms_length):
    """
    Memoized version

    Parameters
    ----------
    amount : int
        Target amount
    denoms : list<int>
        denominations
    denoms_length : int
        number of unique denominations

    Returns
    -------
    int
        count of ways

    >>> memoized_coin_change(10, [25, 10, 5, 1], 4)
    4
    """

    cache = {}

    def helper(current_amount, current_index):
        if (current_amount, current_index) in cache:
            return cache[(current_amount, current_index)]
        if current_amount == 0:
            return 1
        if current_index == denoms_length:
            return 0

        current_denom = denoms[current_index]
        including = 0
        if current_denom <= current_amount:
            including = helper(current_amount - current_denom, current_index)

        excluding = helper(current_amount, current_index + 1)
        cache[(current_amount, current_index)] = including + excluding
        return cache[(current_amount, current_index)]

    return helper(amount, 0)