23

Why you no memo? :/

Comments
  • 2
    Memoisation != DP though
  • 0
    Premature optimization? How frequently is the function called?
  • 0
    @Lahsen2016 Google for fibbo using memoization... You can find a time optimised way to solve this kind of problems...
  • 0
    If I'm not mistaken this has exponential complexity
  • 2
    @Lahsen2016 no, but it will on subsequent calls because the calculated values aren't cached.
Add Comment