Convert mystery_recursive into a linear-time dynamic programming algorithm mystery_iterative using a loop (rather than memoized recursion) in Python. (This code is not solving any particularly interesting problem; it’s just an example.)
What is your question? Can't you create a dictionary((0,1), (1, x), and calculate the function values for n = 2 to whatever, using the dictionary and the given recursion , updating the dictionary as you go?
posted 2 weeks ago
Thanks for all of the help Marshall Ritchie but, problem solved. Eh.