

This won't beat quick sort or merge but it does ok against the slower sorts We swap every time we find a lower number and then we can start our next pass from the point where the last number was swapped. So it's kinda like selection sort but instead of flagging the lowest number then swapping at the end of a pass We continue doing this until there's no swaps and then begin the process again. We now only need to compare this number with numbers to the right of where it was instead of the whole list We know that the last number we swapped is smaller than all those before it, so we swap that into position two

Starting with the first number we run down all the numbers and swap whenever we find a lower numberĪfter the first pass the lowest number is in position one I was messing around with some sorting algorithms and think I might have come up with something new.
