comp.sci class after-action (+) Show more
Most of the optimisations are in the form of keeping track of the number of iterations, to avoid re-checking the end of the array each time, so really they're just optimising bubblesort.
We start a conversation about the effects of bubblesort. We observe that the largest element gets pushed to the end of the list on each iteration. One student suggests that we could just scan the list to pick the largest element and move it straight to the back