Advent of Code 2025#
my submissions for Advent of Code 2025
first time I've ever made it all the way to the end! it helped that the number of puzzles were halved this year of course.
merry christmas 🎄
lol I cracked open my big book of algorithms to confirm this is NP-hard
before trying out the most näive approach possible
I don't love how I don't really understand how this works – I should
read up more on linear programming – and the number of additional
dependencies this pulls in, but it sure does run a lot faster than my
previous approach. It only takes 10ms to solve the problem and that's
with an unoptimised pure Rust solver.
I spent ages trying to refine and optimise a solution for this challenge
which made use of combinatorics whilst trying to optimise the number of
permutations tested as much as possible. I still had to kill the program
after it ran for 5 hours on my M1 Pro and still was only about 25%
complete.
I saw other people suggesting linear algebra online and I've been
stubbornly avoiding trying it because I doubt I would have thought of
that myself, but now I'm going to take it as an opportunity to learn (or
revise?!) a new subject!
my submissions for Advent of Code 2025
first time I've ever made it all the way to the end! it helped that the number of puzzles were halved this year of course.