← Paytm questions

Time complexity of recursive Fibonacci code

Filed under Paytm

Determine and explain the time complexity of a naive recursive Fibonacci code snippet: def fib(n): if n <= 1: return n return fib(n-1) + fib(n-2).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Paytm questions

Collected from public candidate posts and coding forums. Updated Nov 2026.