Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
RasterInterrupt
RasterInterrupt
@rasterinterrupt@oldbytes.space  ·  activity timestamp 2 months ago

#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

A meme pic showing a perplexed Arnold Schwarzenegger/Terminator with the headline "Realizing Linear Algebra Is Everywhere."
A meme pic showing a perplexed Arnold Schwarzenegger/Terminator with the headline "Realizing Linear Algebra Is Everywhere."
A meme pic showing a perplexed Arnold Schwarzenegger/Terminator with the headline "Realizing Linear Algebra Is Everywhere."

Day 10 - Advent of Code 2025

GitHub

AdventOfCode/dotnet/2025/Day10/Day10.cs at main · nharrer/AdventOfCode

My Advent of Code solutions. Contribute to nharrer/AdventOfCode development by creating an account on GitHub.
  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct