DescriptionFarmer John completed his new barn
just last week, complete with all the latest milking technology. Unfortunately,
due to engineering probl...
分类:
其他好文 时间:
2014-04-29 16:46:46
阅读次数:
371
2014-04-29
00:59题目:设计一个洗牌算法,效率尽量快点,必须等概率。解法:每次随机抽一张牌出来,最后都抽完了,也就洗好了。时间复杂度O(n^2),请看代码。代码: 1
// 18.2 shuffle a deck of 52 cards, it must be perfect rand...
分类:
其他好文 时间:
2014-04-29 14:38:25
阅读次数:
473