Skip to content

Commit 47055a6

Browse files
committed
Scaffold d21
1 parent 7a3cd66 commit 47055a6

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

21.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// The Garden of Forking Paths
2+
//
3+
// Part 1: Do a BFS to find all reachable nodes within 64 steps.
4+
5+
func readInput() -> [[Character]] {
6+
var result: [[Character]] = []
7+
while let line = readLine() {
8+
result.append(Array(line))
9+
}
10+
return result
11+
}
12+
13+
let map = readInput()
14+
print(map)

examples/21-a

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
...........
2+
.....###.#.
3+
.###.##..#.
4+
..#.#...#..
5+
....#.#....
6+
.##..S####.
7+
.##..#...#.
8+
.......##..
9+
.##.#.####.
10+
.##..##.##.
11+
...........

0 commit comments

Comments
 (0)