DEV Community

Discussion on: Advent of Code 2017

Collapse
 
rpalo profile image
Ryan Palo

I’m in! I’d never heard of this before now, but it looks cool :) Here’s my solutions.. Thanks for sharing this!

Collapse
 
philnash profile image
Phil Nash

Oh, Array#rotate is perfect! My first version I'd zipped the arrays together like that, but then did it differently for the general case and ultimately converged on that solution. But I think I want to rewrite mine now, since Crystal supports rotate too!

Collapse
 
rpalo profile image
Ryan Palo

Originally i was just doing it with the index and math, but then I was scrolling through the array docs looking for something neat and found rotate. I didn’t to know about it, but it’s supercool :)