src/gen-util.c
void shuffle(int *arr, int n)
{
    int i, j, k;
    for (i = 0; i < n; i++) {
		j = randint0(n - i) + i;
		k = arr[j];
		arr[j] = arr[i];
		arr[i] = k;
    }
}
/**
 * Shuffle an array using Knuth's shuffle.
 * \param arr array
 * \param n number of shuffle moves
 */
Shuffle an array using Knuth's shuffle.
\param arr array
\param n number of shuffle moves
Shuffle an array using Knuth ' s shuffle . \ param arr array \ param n number of shuffle moves
void shuffle(int *arr, int n)
{
    int i, j, k;
    for (i = 0; i < n; i++) {
		j = randint0(n - i) + i;
		k = arr[j];
		arr[j] = arr[i];
		arr[i] = k;
    }
}
void shuffle ( int * arr , int n ) { int i , j , k ; for ( i = 0 ; i < n ; i ++ ) { j = randint0 ( n - i ) + i ; k = arr [ j ] ; arr [ j ] = arr [ i ] ; arr [ i ] = k ; } }
Shuffle an array using Knuth's shuffle.
Shuffle an array using Knuth ' s shuffle .