Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Still building an octree for day 8. If I accomplish nothing else for the rest of AoC but finish this, it will have been worthwhile.
-
https://adventofcode.com/2025/day/9
Is it this here? I don't see any part 2?
I have never done aoc before, but I don't see any reason to draw an array here at all. That is not it, is it? That's to easy.. At least the naive solution is easy...
Where do I go to find part 2? -
@TrayKnots you gotta submit part 1 to get part 2. The idea is that part 2 is usually a more complex form of the problem that you shouldn't plan for when you come up with the simpler strategy for part 1.
-
@TrayKnots also when you log in you will get your personal input which is much, much larger than the small example.
For day 9 the x and y coords are in the range of 0 to 100000 -
@Lensflare I realized day of that this would be bruteforceable in Rust and probably manageable with just 5x5x5 chunks in Python even, but I think this solution is fun so I'm sticking to it.
-
@Lensflare I avoid bruteforce solutions in AoC even when they're possible because I think they're boring.
-
Just had a look at part 2. I don't have time to solve it right now, but my gut tells me that this is a case for a sweep line algorithm.
-
AoC gets INSANE really quickly. Last year i didn't make it past day 12 i believe lol
-
@lorentz most aoc puzzles are not brute forcable because the explosion of combinations gets too large.
-
lorentz1544020h@Lensflare i mean you have to be a _little bit_ smart about it, but just blasting through all 1M combinations of 1000 coordinate triads with a loop is more than feasible. If you avoid expensive operations in the loop, it's indeed a couple of seconds in a compiled language.

Holy hell, aoc day 9 part 2 is diabolical!
Has anyone solved it and can give me a hint (not the solution)?
The naive approach would be to make an array with 100000^2 elements, or an image with that many pixels, but that's just too large.
There must be a smarter way.
rant
aoc2025