Advent of Code 2025 - Day 11

Sad to think it’ll be over tomorrow :sob: Guess I’ll have to amuse myself in the rest of December by revisiting old puzzles I never solved!

Part 1 was super straightforward - this is a directed graph, and the two nodes are pretty close together.

For part 2, the nodes are not close together, they’re at opposite ends of the graph :frowning:

So I used a similar BFS approach to the puzzle with counting the timelines in the beam splitter (day 7) though this code ended up being a lot nicer! I split it into three parts - svr to fft, fft to dac, and then dac to out, multiplying the numbers together at the end.

https://github.com/sevenseacat/advent_of_code/blob/main/lib/y2025/day11.ex

Name                     ips        average  deviation         median         99th %
day 11, part 1        321.81        3.11 ms     ±5.50%        3.05 ms        3.57 ms
day 11, part 2        176.86        5.65 ms     ±3.21%        5.61 ms        6.12 ms