Bucket sort

medium

Splits by value rather than by position, so concatenating the buckets needs no merge step. Load the 'few unique' preset to watch every value land in one bucket and the whole thing degenerate.

Best O(n + b)Average O(n + n²/b + b)Worst O(n²)Space O(n + b)StableNeeds extra memory
Loading the bucket sort engine…

Where to go next