News for hackers. Stuff that matters.
Re:Unconventional Sorting Algorithms by Sohcahtoa82 on Thursday October 21, 2021 @06:01PM (#28951355)
I like Intelligent Design sort:

> 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.

https://www.dangermouse.net/esoteric/intelligentdesignsort.h...

Re:Unconventional Sorting Algorithms by kjeetgill on Friday October 22, 2021 @12:43AM (#28953810)
Ohhhhhh... fascinating! Is there a good metric for how well sorted a list is? Maybe for every pair of elements, how many are in the correct order?

Given a random shuffle of a list, what are the chances that another shuffle would be more sorted? There's a life lesson in here, I know it...

Re:Unconventional Sorting Algorithms by pedrosorio on Friday October 22, 2021 @12:52AM (#28953856)