Comment

Comment by ogogmad

Bubblesort is usually the worst sorting algorithm, in every conceivable way. Given that in a sorting network, bubble sort is dual to insertion sort [1], why can't the optimisations in the blog post be applied to insertion sort? I believe they can be, and the author was just being facetious.

Stop teaching bubble sort.

[1] - https://en.wikipedia.org/wiki/Sorting_network#Insertion_and_...

parent ogogmad 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton