Timeline Sandbox

Conversation

Recent posts in reply to #te6p5oa

@prologic@twtxt.net

Day 9 also required some optimizations, if you aren't careful, you end up with really inefficient algorithms with time/memory complexity beyond what a typical machine has 🤣

Read replies 3 months ago
@prologic@twtxt.net

@movq I shrank Day 9 Part 2 from “cover the whole map” to “only track the interesting lines.” By compressing coordinates to just the unique x/y breakpoints, the grid got tiny. I still flood-fill and do the corner-pair checks, but now on that compact grid with weighted prefix sums for instant rectangle checks. Result: far less RAM, way less CPU, same correct answer.

In reply to: #te6p5oa 3 months ago
Comment via email