8 if (seed == 0)
return (NULL) ;
10 if (!p)
return (NULL) ;
11 for (k = 0 ; k < n ; k++) p [k] = n-k-1 ;
12 if (seed == -1)
return (p) ;
14 for (k = 0 ; k < n ; k++)
16 j = k + (rand ( ) % (n-k)) ;
void * cs_malloc(int n, size_t size)
int * cs_randperm(int n, int seed)