Where the four hours went
ways(n) = ways(n-1) + ways(n-2) is correct and does not finish for
n = 50, although there are only fifty distinct values it could ever be asked
for.
Why is it slow?
ways(n) = ways(n-1) + ways(n-2) is correct and does not finish for
n = 50, although there are only fifty distinct values it could ever be asked
for.
Why is it slow?