The bug in the random sort

added by DotNetKicks
3/5/2020 4:40:46 PM

213 Views

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.


0 comments