Create a Python program to optimize the running time of a program using memoization.
# k: as an input parameter
# f: a recursive function
def memoize(f, k):
    memo = dict()
 
    def helper(x):
        if x not in memo:            
            memo[x] = f(x)
        return memo[x]
 
    return helper(k)