2 ms·
On any bubble sort, optimised or not, no swaps are made on an array that's already sorted. The routine in the article does. So no, it's not a bubble sort, uno
by ColinWright 2y ago
On any bubble sort, optimised or not, no swaps are made on an array that's already sorted.
The routine in the article does.
So no, it's not a bubble sort, unoptimised or otherwise.
If you think it is a bubble sort then I'd be interested in seeing your implementation of a bubble sort, and an explanation as to why they are effectively the same.