Sunday, October 22, 2017

[LeetCode]Shuffle an Array

用Fisher-Yates算法即可,时间复杂度O(n),常数空间,代码如下:


No comments:

Post a Comment