Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.