Skip to content

Instantly share code, notes, and snippets.

@faraazahmad
Last active December 28, 2017 14:18
Show Gist options
  • Save faraazahmad/0fde7d3a06eefaaac76668db5cf96c55 to your computer and use it in GitHub Desktop.
Save faraazahmad/0fde7d3a06eefaaac76668db5cf96c55 to your computer and use it in GitHub Desktop.
Simple pseudocode for naive recirsive fibonacci algorithm
def naive_fib(n):
if n >= 0 and n <= 1:
return n
else:
return naive_fib(n - 1) + naive_fib(n - 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment