Commit graph

2 commits

Author SHA1 Message Date
d7d5312786 Solve 2024:21 pt2 "Keypad Conundrum"
Turns out the initial trial of using
Manhattan distance was required to
solve part 2, since the BFS
implementation is impossible to
scale up from 2 robots to 25.

Recursion and memoization makes the
execution time acceptable.

Line 53 makes all the difference here.
The order of `<|v|^|>` matters when
constructing a sequence. Many
hours was spent trying to find the correct
priority. For the example input, especially
456A and 379A were volatile.
2025-01-05 00:06:18 +01:00
3a9a7d4994 Solve 2024:21 p1 "Keypad Conundrum"
Early versions of the code used Manhattan distance
instead of BFS to find the movements. Turns out this
was covering about 80% of all cases.
2025-01-05 00:06:18 +01:00