File size: 414 Bytes
ff444f7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
The same observations we used for chapter 1 also apply to chapter 2, we simply need to find a more compact way to create a long path with alcoves. We need a main path of about length \(40\) to make any number up to \(10{,}000\).
Here's a possible approach that fits on a \(10\) × \(10\) grid:
```
@.....#.#.
#.#.#.#...
.#.#..#.#.
.....#..#.
#.#.#..##.
...#.#.#..
.#.#.#..#.
..#...#.#.
#...#....#
..#..#.#..
```
|