Created
April 7, 2016 14:05
-
-
Save ksmithbaylor/e042f4087af93198976b846598af555d 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 factorial n | |
(1..n).reduce :* || 1 | |
end | |
def snake_case_paths size | |
factorial(2 * size) / factorial(size) ** 2 | |
end | |
puts snake_case_paths 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍