algorithm-exercises-java/docs/projecteuler/problem0015.md at main · sir-gon/algorithm-exercises-java · GitHub
Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 1.27 KB

File metadata and controls

24 lines (20 loc) · 1.27 KB

Starting in the top left corner of a $ 2 × 2 $ grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.

 ───► ───►      ───► ────      ───► ────
│    │    │    │    │    │    │    │    │
│    │    ▼    │    ▼    │    │    ▼    │
 ──── ────      ──── ───►      ──── ────
│    │    │    │    │    │    │    │    │
│    │    ▼    │    │    ▼    │    ▼    │
 ──── ────      ──── ────      ──── ───►

 ──── ────      ──── ────      ──── ────
│    │    │    │    │    │    │    │    │
▼    │    │    ▼    │    │    ▼    │    │
 ───► ───►      ───► ────      ──── ────
│    │    │    │    │    │    │    │    │
│    │    ▼    │    ▼    │    ▼    │    │
 ──── ────      ──── ───►      ───► ───►

How many such routes are there through a $ 20 × 20 $ grid?