Articles, deep dives, and notes from the engineering community.
An unstable, in-place comparison sort that is theoretically optimal in terms of the total number of array writes: places every element in its final sorted slot by decomposing the array permutation into cycles.
By Md. Harun-Or-Roshid
A natural sorting algorithm: represents numbers as rows of sliding beads on vertical wires, letting gravity pull the beads down to sort the items instantly in analog hardware.
A high-performance distribution sort: maps elements directly to their proximity slots in a destination array using a mapping function, resolving slot collisions with local insertion sort.
A state-of-the-art string-based sorting algorithm: dynamically builds a trie with leaf-level buckets, "bursting" buckets into sub-tries when they grow too large, followed by a fast comparison sort sweep.
The garden gnome sort: a remarkably simple single-loop exchange sort modeled after a gnome checking adjacent flowerpots and moving backward or forward accordingly.
A highly parallelizable exchange sort: alternates between swapping adjacent odd-indexed pairs and even-indexed pairs, forming the basis for hardware-based sorting networks.
A bidirectional bubble sort: bubbles values back and forth in alternating directions to quickly clear slow-moving small values ("turtles") and large values ("rabbits").
An ingenious improvement on Bubble Sort: compares elements at a shrinking gap size to eliminate small values trapped near the end of the array ("turtles") before finishing with a final bubble pass.
A state-of-the-art hybrid distribution sort: combines bucket partitioning based on key bits with standard comparison algorithms for small bins, outperforming Quicksort on many datasets.
The holy grail of comparison sorts: an in-place, stable hybrid algorithm that achieves O(n log n) efficiency without requiring any auxiliary heap or merge memory buffers.
A hybrid sorting algorithm: starts with Quick Sort for high speed, switches to Heap Sort if recursion limits are hit, and drops to Insertion Sort for tiny subarrays.
The modern industry-standard sorting algorithm: a high-performance hybrid of Merge Sort and Insertion Sort designed to exploit pre-existing order in real-world data.