Forum Discussion
Day 10 was a rather interesting problem to do via SnapLogic, and I thought I might already have to deal with more state-saving in a loop, but I found a way around it this time (yes, I’m very excited about this). We know this input is pretty small based on part 2, but by collecting all inputs, you can calculate the sum of some value at a given index with slice
and then reduce
for that value. The hardest part for this was determining what each part was really wanting when it comes to those values (I struggled with that when I solved the problem via Java at midnight).
Frankly, there’s nothing super stand-out of this solution, other than again finding a way to potentially re-imagine the problem in a different frame. We could’ve done what we did yesterday for Day 9 and saved state in a loop, but with the smaller input data that we had, I figured this was a pretty good way to show how you can somewhat avoid having to save state in these kinds of situations.
Screenshot:
SLP File:
day10_2022_12_10.slp (38.1 KB)