Skip to content

Comment on Dynamic Progamming: First Principlesparent

Comments

No, if you look at vanderZwan's explanation for the non-tail recursive call, you'll see that it doesn't build on a finished result of the previous call.

You have to recurse until you reach n == 0, and only then does the whole sum "collapse".
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.