Skip to content

algorithm_FatefulSort

Jason Sperske edited this page Sep 27, 2017 · 2 revisions

Fateful Sort

A VERY optimistic sort algorithm that only works if it is passed (as if by fate) an already sorted list.

Time Complexity:
      Best Case: Ω(1)
   Average Case: Θ(∞)
     Worst Cast: O(∞)

This algorithm, when implemented, offers a stable and in-place for maximum memory and processor efficiency. By leveraging the observation that everything in the end will be meaningless (or burned up by the expanding heat death of the sun) the FatefulSort does not expend any effort in error checking as such efforts would be meaningless (in the long term). There is another side benefit that the FatefulSort remains one of the easiest tests to code on a whiteboard.

Clone this wiki locally