Skip to the content.

Deep Dive: Task 1 Deep Dive — Naïve Recursive Strategy

Concept

The naïve recursive Fibonacci directly follows the mathematical recurrence:

This mirrors the definition but recomputes overlapping subproblems exponentially many times.

Time & Space Complexity

Why Study It?

Pitfalls

Pseudocode

function fib_naive(n):
    if n < 0: error "n must be non-negative"
    if n <= 1: return n
    return fib_naive(n-1) + fib_naive(n-2)

What You Should Implement

Test Ideas