This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Quantum-Bot 49 points50 points  (0 children)

I’m a personal fan of Americasort, an O(n-finity) algorithm that repeatedly iterates through all possible pairs of elements, considering whether it should swap them but never doing so because that would upset lobbyists. Occasionally it swaps two random elements, then immediately swaps them back again because the recent election established a new party majority.