sorting - How to do a simple random sort of values within an array -


i need sort these values randomly in array.

int [] d = new int[26];           d[0]=1;           d[1]=5;           d[2]=10;           d[3]=25;           d[4]=50;             d[5]=75;           d[6]=100;           d[7]=200;           d[8]=300;           d[9]=400;           d[10]=500;           d[11]=750;           d[12]=1000;           d[13]=2000;           d[14]=3000;           d[15]=4000;           d[16]=5000;           d[17]=7500;           d[18]=10000;           d[19]=25000;            d[20]=50000;           d[21]=100000;           d[22]=250000;           d[23]=500000;           d[24]=750000;           d[25]=1000000;   

assuming writing in c++ can use random_shuffle function template standard library. http://www.cppreference.com/wiki/algorithm/random_shuffle


Comments