Re:Worstsort
by rocqua on Saturday March 16, 2019 @06:10AM
(#19407137)
That has expected running time N! loops. Far from horrible unless you make the 'is sorted' or 'randomize' calls horrible.
The great thing about this algorithm is that the same piece of code does all these things. There isn't a separate bodge for checking whether something is sorted.
The great thing about this algorithm is that the same piece of code does all these things. There isn't a separate bodge for checking whether something is sorted.