Skip to content

Instantly share code, notes, and snippets.

@carlogilmar
Created November 29, 2017 05:13
Show Gist options
  • Save carlogilmar/16979cf0b4909f66c7f8af74b1493c62 to your computer and use it in GitHub Desktop.
Save carlogilmar/16979cf0b4909f66c7f8af74b1493c62 to your computer and use it in GitHub Desktop.
Fibonacci First Solution
func fib1(n: UInt) -> UInt {
if(n<2){
return n
}
return fib1(n: n-2) + fib1(n: n-1)
}
fib1(n: 20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment