Fibonacci (Memoized)

Difisil · javascript · javascript · dynamic-programming

Write solution(n) that returns the nth Fibonacci number (0-indexed: fib(0)=0, fib(1)=1) efficiently enough for n up to 40 within the time limit.

Tès egzanp

solution(10) // => 55

Soumèt

Klasman →