Sorting algorithms..there’s a whole bundle of them each with advantages and disadvantages over the others. If you want to understand some of these method and have a fairly visual mind this site will probably be right up your alley.
Use that site and play around with different initial conditions and see which method works best. This can really be helpful along some terser text as a way of seeing what the author is on about.
I’m on call this week for work so I best go try grab some shuteye before someone calls.