You can use the code if you want, but this algorithm is so slow, I wouldn't recommend it. In Turbowarp w/ turbo mode, 60 FPS, interpolation and visuals, 200 items took 24.5 seconds. 2.3 secs without showing process. 0 seconds with no rendering. Variable "i" goes through the list, checks if the number in front of it is greater than itself( list[i+1] > list[i] ), then if so, swaps them around.
I looked at some pictures from google, and it was so simple I made it in less than 10 minutes.