Join Slack
Powered by
I used an accumulator function which folded over a...
# advent-of-code
a
andyb
12/10/2018, 6:02 PM
I used an accumulator function which folded over an infinite sequence & only kept the star fields which have converged to a small size. I then just picked the one of these with the smallest size. Worked in this instance.
Day10.kt
t
todd.ginsberg
12/10/2018, 6:03 PM
Very cool
a
andyb
12/10/2018, 6:05 PM
Again wouldn't have worked if all the stars came from a Big Bang singularity and then passed through an arrangement of letters.
k
karelpeeters
12/10/2018, 6:07 PM
s.inc()
? That's
s + 1
, right? Cool solution!
a
andyb
12/10/2018, 6:07 PM
More like s++, think of it as moving to the next step
k
karelpeeters
12/10/2018, 6:08 PM
Ah I missed that that was an operator on Star, I hough that was for keeping track of the iteration number.
8
Views
Open in Slack
Previous
Next