This is the same sorting method (optimized bubble sort) that I use in my Flood fill project.
It was faster than the insertion sort that I tested.
Why is this faster than the standard bubble sort?
With bubble sort, the entire list is scanned each time until there are no swaps.
This optimized bubble sort keeps track of were a swap last occurred and sets that as the new end of the list!
So if the last swap was in the middle of the list, only one-half of the list will be scanned after that.
---
Scott
Very well done Scott! Genius