Skip to content

Instantly share code, notes, and snippets.

@teyyihan
Last active December 9, 2020 10:02
Show Gist options
  • Save teyyihan/9239e0c3cb751e519ee6dce77dc5397a to your computer and use it in GitHub Desktop.
Save teyyihan/9239e0c3cb751e519ee6dce77dc5397a to your computer and use it in GitHub Desktop.
func fib(num int) int {
if num <= 1 {return 0}
if num == 2 {return 1}
return fib(num-1) + fib(num-2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment