Day 4 - Solutions
https://gitlab.com/maximoburrito/advent2025/-/blob/main/src/day04/main.clj
List comprehension was super helpful for this one https://github.com/brandoncorrea/advent-of-code/blob/master/clojure/src/aoc/y2025/day04.cljc
I like your hashmap approach. Probably faster than iterating the sequences over and over again. That thought came to mind only after having completed part 1, so I just stuck with what I had.
https://github.com/samcf/advent-of-code/blob/main/2025-04-printing-department.clj I used a set of indices into the flattened grid which contained paper rolls, then looped over a set of indices to check next (possibly to remove) and a set of indices which still remained... about 80ms for everything (babashka)
Having helper functions really speeds up that kind of things. Never have to think about the details of grids anymore. Full context : https://github.com/Maravedis/advent_code/blob/master/src/advent_of_code/2025/04.clj
AI assisted
I used iterate to capture each frame for visualization
https://github.com/tschady/advent-of-code/blob/main/src/aoc/2025/d04.clj
part 2 was surprisingly straightforward https://github.com/FelipeCortez/advent-of-code/blob/master/2025/04.clj
fixed-point method for part 2 https://github.com/benfle/advent-of-code/blob/main/src/advent_of_code/2025/04.clj
I was planning to do some quil-animation for today's task, but in the end I didn't have enough time for that... 😢 Here's just a notebook with the solution: https://narimiran.github.io/aoc2025/src/day04/
https://github.com/rjray/advent-2025-clojure/blob/master/src/advent_of_code/day04.clj Probably not the fastest (and certainly not the shortest). But I do like being able to directly compare vector-of-vectors instances for equality.
warning bad code: I wrapped a grid with dots and just brute forced both parts
Made a graph of all neighboring rolls so I could directly follow the chain reaction of becoming removable. I think it's a lower time complexity than searching all the remaining rolls over and over?
Day 4 was fun and not too hard. https://github.com/ChrisBlom/advent-of-code/blob/master/src/adventofcode/2025/day04.clj
This one was easy because you can easily represent the rolls as a set of [row col] tuples. Also, I printed out the rolls at the end of stage 2 to see if it was a hidden message or picture ... it wasn't. So far, just found one hidden message.
what was the hidden message? CLICK?
Yes, CLICK.
Catching up.. was very busy yesterday. I leaned on my grid helpers, part 2 is rather slow (several seconds) but good enough .. on to day 5 https://github.com/Ramblurr/advent-of-code/blob/main/src/aoc/2025/day04.clj
https://github.com/genmeblog/advent-of-code/blob/master/src/advent_of_code_2025/day04.clj
Finally had some time to the animation (done with Quil):
Nice!
https://mateuszmazurczak.com/aoc/2025/4#solution-b30905ef-1c1b-4aa1-9b02-0948f0ce50dc