Question

What is the space complexity of a naive recursive implementation of the Fibonacci sequence (without memoization), measured by the maximum depth of the call stack at any point during execution?

A O(n), matching the maximum depth of the recursive call stack at any point
B O(1), since no additional space is required beyond the input value itself
C O(log n), matching the depth of a balanced binary recursion tree structure
D O(n^2), matching the total number of redundant calls made during execution
E O(2^n), matching the total number of nodes in the full recursion tree
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)