关于[The bug in the random sort]的摘要:
We needed to randomize a list of values, so I quickly wrote the following code. What do you expect the output to be? The number vary slightly, but they are surprisingly consistent overall. C is about 50% likely to be at the head of the list, but I wanted the probability to be 33% obviously.
原文地址: https://ayende.com/blog/190210-C/the-bug-in-the-random-sort