Hacker News new | ask | show | jobs
by Dr_Emann 1947 days ago
And for move to front, why not `a[..i+1].rotate_right(1);`, rather than moving to the back and then shifting everything?
1 comments

Uh... 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.