3 Commits

Author SHA1 Message Date
8af11a6092
day10: performance. slight gain from memoizing visited positions in p1. 2024-12-10 17:07:00 -08:00
d9d55b069f
day10: optimization
Part 2 doesn't actually require tracking state at all, it's enough to
just follow the rules and count every DFS that lands on a target square.

Part 1 optimized by only tracking which targets have been previously
visited, instead of all squares.

Both parts, pass position reference to recursive calls instead of by
value for tiny improvement.
2024-12-10 16:20:15 -08:00
0716dde8b1
day10: complete solution 2024-12-09 21:59:39 -08:00