這裡以Fisher–Yates shuffle 演算法爲例,僞代碼如下: To shuffle an array a of n elements (indices 0..n-1): for i from 0 downto i do j ← random integer such ...
確定! 回上一頁