Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a sort of TL;DR: it's basically like selection sort but instead of selecting the sort-compliant choice among the remaining ones, you ask the RNG and pick a random one.


However, note that using a random function as the comparator for a sort function does not generally result in an unbiased shuffle.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: