📅  最后修改于: 2022-03-11 14:52:19.453000             🧑  作者: Mango
void shuffle(int [] arr) {
for (int i = 0; i < arr.length; i++) {
int index = (int) (Math.random() * arr.length);
int temp = arr[i];
arr[i] = arr[index];
arr[index] = temp;
}
}