Day 5 Solutions

https://adventofcode.com/2023/day/5

2 points · 2 comments · view on lemmy.world

2 Comments

hal9001@lemmy.world · 1 pts · 2y (1 reply)

Ranges are always pesky. Lots of off by one errors when I was pulling this one together. It was also the first day I caved and broke out atoms

clojure solution

eskimofry@lemmy.world · 1 pts · 2y

at first I was trying to extend my ::: spoiler Solution to problem 1


Which consists of passing a value to a funnel that is the vector whose elements are maps.

That would mean iterating one-by-one over seed ranges. Obviously this is too slow. :::

but then I deviated and started trying to redo the solution to problem 2 from scratch, at one point thinking about using a ::: spoiler spoiler custom tree based solution.

:::

But my laziness won and I went back to my problem 1 solution and extended it there. Like you, faced off-by-one errors caused by not reading the problem statement properly.