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 4 months ago
Thanks for all of the help Marshall Ritchie but, problem solved. Eh.
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
global solutions you can do in your home or backyard