Search
⌘K

Leetcode 509. Fibonacci Number

Compute F(n) defined by F(0)=0, F(1)=1 and F(n)=F(n-1)+F(n-2); return the nth Fibonacci number for 0 ≤ n ≤ 30. The task tests handling a simple linear recurrence efficiently (iterative or memoized DP rather than naive exponential recursion).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.