你的位置: 码友网首页 / 资讯源列表 / The bug in the random sort

关于[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

收录时间: 2020-03-06 浏览量: 1838 分类: C#开发

| 0 收藏 | 0