Ryan is an engineer in the Sacramento Area with a focus in Python, Ruby, and Rust. Bash/Python Exercism mentor. Coding, physics, calculus, music, woodworking. Looking for work!
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!
Ryan is an engineer in the Sacramento Area with a focus in Python, Ruby, and Rust. Bash/Python Exercism mentor. Coding, physics, calculus, music, woodworking. Looking for work!
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 :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I’m in! I’d never heard of this before now, but it looks cool :) Here’s my solutions.. Thanks for sharing this!
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 supportsrotate
too!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 :)