easy5 pts · first answer countsdynamic-programmingrecursioncomplexity
Cost of plain recursive Fibonacci
What is the time complexity of this function?
function fib(n) {
if (n < 2) return n
return fib(n - 1) + fib(n - 2)
}Discussion 0
Join free to post in the discussion.
Related questions
- Signs that a problem suits DPBackend Developer
- What memoisation meansBackend Developer
- What tabulation meansBackend Developer
- Fibonacci after adding a cacheBackend Developer
- Recursion with no base caseBackend Developer
- Ways to climb five stairsBackend Developer
- Hidden memory cost of recursionBackend Developer
- Why merge sort is not DPBackend Developer