DEV Community

Alexander Kazanski
Alexander Kazanski

Posted on

Naive Fibonacci is a trap — it recalculates the same values millions of times. Add a memo object and you drop from O(2ⁿ) to O(n) instantly.

Top comments (0)