example/fib/fib.go
- 392 bytes
- Go
- View raw
3// FibRecursive computes the nth Fibonacci number recursively (O(2^n)).
7 }
9}
11// FibIterative computes the nth Fibonacci number iteratively (O(n)).
15 }
19 }
21}