SAM stands for Sorting Algorithm Madhouse.
SAM is open source project dedicated for impractical sorting algorithms.
I will open Github repository soon for this, so stay tuned if you want contribute, stay tuned!
Update Logs:
v1.1
- Added Instant Sort
- Revised functions
Existing Sorts:
Bogo Sort
Classic shuffling sort. Randomly shuffles the array until it happens to be sorted.
Expected time: O(n·n!)
BogoBogo Sort
Bogo Sort but recursive. Sorts the first n-1 elements with Bogo Sort, then checks the whole thing. Extremely cursed.
Time: Beyond comprehension
Assault Sort
Repeatedly replaces the entire array with random values until it magically becomes a sorted version of the original array.
Time: Unpredictable (practically infinite)
Miracle Sort
Does absolutely nothing except wait. Checks every 0.1 seconds if the array is sorted by miracle.
Time: Depends on divine intervention
Thanos Sort
Snaps away half the elements at random until only a sorted subset remains.
“Perfectly balanced, as all things should be.”
Time: O(n log n) eliminations
Slow Sort
A multiply-and-surrender algorithm. The original “intentionally slow” recursive sort.
Time: O(n^(log n)) or worse
Hyper Slow Sort
An even slower variant of Slow Sort with more aggressive recursion.
Time: Significantly worse than Slow Sort
Worst Worst Sort
Assault Sort but with maximum possible integer values and extreme length randomization.
Extremely likely to crash or lag forever.
Time: Practically infinite
Endless Black Nothingness Sort
An unholy combination of deep recursion, omega-level swapping, and existential despair.
Time: ∞ (You will see nothing but black void)
Bubble Less Faster Growing Hierarchy Sort
Uses concepts from the Fast-Growing Hierarchy (f_α) combined with bubble passes.
Warning: Mathematically terrifying.
Time: Grows faster than any practical function
Kirby-Paris Hydra Sort
Based on the Kirby-Paris Hydra battle. Every time you cut a head, more grow back in a horrifying recursive manner.
Time: Extremely fast growing
Quanteuse Bogo Sort
Shuffles once. If not sorted, kicks all players from the game with the message “UNIVERSE DESTROYED”.
Time: Instant (or server death)
Fire Sort
A chaotic cocktail sort variant that alternates direction with complex state tracking.
Time: O(n²) with extra drama
In-place Least Significant Digit Radix Sort
Actually decent LSD Radix Sort implemented in-place using bit operations.
One of the only real sorting algorithms here.
Time: O(n·k)
Guess Sort
Generates every possible permutation in lexicographical order until it finds the correct sorted one.
Time: O(n!)
Stalin Sort
Removes (overwrites) any element that is out of order.
“Some elements had to be purged for the greater good.”
Time: O(n)
Simple In-place Safe Stalin Sort
A safer, more careful version of Stalin Sort that moves elements instead of overwriting.
Time: O(n²) worst case
Awkward Sort
A very awkward and inefficient merge-insertion hybrid sort. Feels uncomfortable to watch.
Time: Very slow
Faster-growing Hierarchy Sort
Implements the Fast-Growing Hierarchy (f_α) inside a recursive sorting function.
Mathematically overkill.
Time: Grows insanely fast
Instant Sort
Deletes everything. The array becomes empty.
Technically sorted.
Time: O(1)
Endless Black Worst Nothingness Sort
The final boss. Hybrid of Endless Black Nothingness + Worst Worst Sort.
Extremely high chance of crashing or freezing the visualizer.
Time: Beyond all known hierarchies