Skip to content

the wackiest, pessimal of algorithms that you won't ever need

License

Notifications You must be signed in to change notification settings

say4n/esoterica

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esoterica
esoterica

the wackiest, pessimal of algorithms that you won't ever need

algorithms

bogosort

To sort a list, just shuffle it till entropy finds its way to order. Wikipedia says, "Its name is a portmanteau of the words bogus and sort".

[ View Source ] [ Description ]

intelligent design sort

Also known as "Assumption Sort": Assume the list is sorted, return! The probability of the original input list being in the exact order it's in is 1/(n!). There is such a small likelihood of this that it's clearly absurd to say that this happened by chance, so it must have been consciously put in that order by an intelligent Sorter. Therefore it's safe to assume that it's already optimally Sorted in some way that transcends our naïve mortal understanding of "ascending order". Any attempt to change that order to conform to our own preconceptions would actually make it less sorted.

[ View Source ] [ Description ]

sleep sort

To sort a list, it spawns a coroutine for each element that sleeps for the element's value, in seconds (times a multiplier for reducing wait time). The order the coroutines print in will be in sorted order, almost always™.

[ View Source ] [ Description ]

author

Sayan Goswami (@say4n)

About

the wackiest, pessimal of algorithms that you won't ever need

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages