We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
fib(n)= fib(n-2) + fib(n-1)
climb(n) = climb(n-2) + climb(n-1) # curr = pprv + prv
Rod Cutting
rodcut(n, p) = max(r, p[i] + rodcut(n - i, p))