Had to implement a sorting algorithm today for the first time in my entire career, so i guess finally learning about them decades ago paid off

Unfortunately since then, I've also learned about test-driven development, and forgotten everything I learned back then. So just went with

1. First implement a test routine "IsSorted(list)" to check the algorithm is right

Sort(list):
While(!IsSorted(list))
SwapRandomEntries(list);
return

Screw you computer science, computer go brrr.
@Pwnallthethings The computational complexity of your solution is, umm, impressive…
@djm @SteveBellovin @Pwnallthethings George Takei has entered the chat