3 ms·
This isn't even worthy of a blog post let alone a published research article, the publisher should be embarrassed. This isn't an innovation. It's just un-optim
by NotAnOtter 2y ago
This isn't even worthy of a blog post let alone a published research article, the publisher should be embarrassed.
This isn't an innovation. It's just un-optimized bubble sort. Back in college when I was learning bubble sort, I implemented this exact sort as a type of "MVP". And then I added the other flags and stuff they reference to try to polish the turd.
I mean I'm glad someone proved it works, but I thought they proved this works like 40 years ago.
- strangattractor 2y agoWorst case bubble sort is n^2 - this one is n^2 for all cases even an already sorted list.
- NotAnOtter 2y ago...Right.. unoptimized bubble sort.
- ColinWright 2y agoOn 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.
- deleted 2y ago[deleted]
- SkiFire13 2y agoI can't see how this looks like a bubble sort to you, the inner loop isn't even comparing adjacent elements of the array. Moreover the comparison is the opposite of what you would normally do: if A[i] < A[j] then swap(A[i], A[j])