#AdventOfCode Day 10: Factory
Part 1 was easy, and I did it before breakfast.
But Part 2: Oh my! I tried to do it with combinatorics first, and it was too slow, even after countless optimizations. There is probably a dynamic programming way to do it, but dynamic programming is my nemesis.
I also figured early on that it was a linear systems problem, but linear algebra is ALSO my nemesis, so I avoided it at first. But since plan A didnโt work, I tried to solve the equations system myself in code with lots of Googling. But I eventually gave up and used a linear algebra package to do it for me (Google.OrTools.LinearSolver). Arghh...
#CSharp code is here:
https://github.com/nharrer/AdventOfCode/blob/main/dotnet/2025/Day10/Day10.cs
Puzzle:
https://adventofcode.com/2025/day/10