4 ms·
And for move to front, why not `a[..i+1].rotate_right(1);`, rather than moving to the back and then shifting everything?
by Dr_Emann 6y ago
And for move to front, why not `a[..i+1].rotate_right(1);`, rather than moving to the back and then shifting everything?
- Measter 6y agoUh... because I'd been up for 20 hours and by brain fixated on a weird way to do it? Don't program when tired, kids.