Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 8e327c388c
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (13 sloc) 0.357 kB
#number of paths to a node follow pascal's triangle
#first diagonal has 1
#second diagonal has 1, 1
#thrird diagonal has 1, 2, 1
#in a 2x2 square, the bottom left is the "center" value of row 4
#for an x by x square, the bottom left will be xth value of row 2x
#choose (2x, x)
require 'euler'
sides = 20
puts (2*sides).choose(sides)
Jump to Line
Something went wrong with that request. Please try again.