Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
faheel28653yMemoisation != DP though
antic17153yPremature optimization? How frequently is the function called?
devRB132973y@Lahsen2016 Google for fibbo using memoization... You can find a time optimised way to solve this kind of problems...
If I'm not mistaken this has exponential complexity
antic17153y@Lahsen2016 no, but it will on subsequent calls because the calculated values aren't cached.