📅  最后修改于: 2022-03-11 14:44:57.349000             🧑  作者: Mango
default_random_engine seed;
vector shuffle(vectorarr) {
for(int i =arr.size()-1 ;i>0;i--)
{
int indx = uniform_int_distribution(0, i)(seed);
swap(arr[i],arr[indx]);
}
return arr;
}