We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Recursion: Fibonacci Numbers
- Discussions
Recursion: Fibonacci Numbers
Recursion: Fibonacci Numbers
Sort by
recency
|
300 Discussions
|
Please Login in order to post a comment
def fibonacci(n): a, b = 1, 1 for _ in range(n - 1): a, b = b, a + b return a
It's weird to me that the Fibonacci sequence is academically used as the "hello world" of recursion because I mean:
Python Dynamic programming
java 8 solution