Thursday, January 28, 2010

Project Euler #15: Lattice paths

This is problem #15.

This problem can be viewed as a multi-permutation of 20 L's and 20 R's where L means "go left" and R means "go right". This way, no searching is needed and the solution can be calculated directly as:

$$\frac{(20 + 20)!}{20!20!}$$
Post a Comment