An inefficient variation of Tiny Gnome Sort by @Iceybicey with one step modified Worst case: n^3 Average case: n^3 Best case: n
@Iceybicey Tiny Gnome Sort is Snail Sort, except it swaps the pairs you actually need to swap. Basically Tiny Gnome Sort increments a counter by one and if it reaches 2 out of order elements it swaps them and resets the pointer.