for i from n − 1 downto 1 do j ← random integer with 0 ≤ j ≤ i exchange a[j] and a[i]. Don't have time to lua that up, but it should be pretty simple.
確定! 回上一頁