Created
January 2, 2017 01:55
-
-
Save keevie/f277001045d8ee953fe867369fd33da2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fibs_sum(n) | |
return 1 if n == 1 | |
return 2 if n == 2 | |
fibs_sum(n - 1) + fibs_sum( n - 2) + 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment