Skip to content

Commit 91aca0f

Browse files
committed
Adding missing README update
1 parent 34f5f8d commit 91aca0f

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

day_12_hill_climbing_algorithm/README.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,40 @@ What is the fewest steps required to move from your current position to the loca
4242

4343
To begin, get your puzzle input.
4444

45-
Answer:
45+
Answer:
46+
47+
## Part Two
48+
49+
As you walk up the hill, you suspect that the Elves will want to turn this into a hiking trail. The beginning isn't very scenic, though; perhaps you can find a better starting point.
50+
51+
To maximize exercise while hiking, the trail should start as low as possible: elevation a. The goal is still the square marked E. However, the trail should still be direct, taking the fewest steps to reach its goal. So, you'll need to find the shortest path from any square at elevation a to the square marked E.
52+
53+
Again consider the example from above:
54+
55+
Sabqponm
56+
abcryxxl
57+
accszExk
58+
acctuvwj
59+
abdefghi
60+
61+
Now, there are six choices for starting position (five marked a, plus the square marked S that counts as being at elevation a). If you start at the bottom-left square, you can reach the goal most quickly:
62+
63+
...v<<<<
64+
...vv<<^
65+
...v>E^^
66+
.>v>>>^^
67+
>^>>>>>^
68+
69+
This path reaches the goal in only 29 steps, the fewest possible.
70+
71+
What is the fewest steps required to move starting from any square with elevation a to the location that should get the best signal?
72+
73+
Your puzzle answer was 345.
74+
75+
Both parts of this puzzle are complete! They provide two gold stars: **
76+
77+
At this point, you should return to your Advent calendar and try another puzzle.
78+
79+
If you still want to see it, you can get your puzzle input.
80+
81+
You can also [Shareon Twitter Mastodon] this puzzle.

0 commit comments

Comments
 (0)