3 ms·
> which a sort should never be There's certainly a most awesome sort algorithm which is exponential... https://www.dangermouse.net/esoteric/bogobogosort.html
by chx 7y ago
> which a sort should never be
There's certainly a most awesome sort algorithm which is exponential...
https://www.dangermouse.net/esoteric/bogobogosort.html https://www.dangermouse.net/esoteric/bogobogosort.html
They are not even sure what the complexity is but it's like O(n!^(n-k)) or O(n*(n!)^n).
- vecter 7y agoI'm aware of bogosort and its crazy variants, but let's not be ridiculous here. You could make any "sorting" algorithm arbitrarily bad if you'd like by doing such silly but useless things.
- samatman 7y agoI propose Boltzmann sort: wait around until the heat death of the universe, and a Boltzmann brain will emerge from the cosmos, and sort your values while contemplating infinity.
- thewakalix 7y agoAh, a fully general O(1) algorithm. Amazing.
- Graham24 7y agoThe very idea of O(n*(n!)^n) is going to give me nightmares.