[algogeeks] Shuffling a deck of cards

2010-08-14 Thread amit
write a program to shuffle an pack of cards in the most efficient way. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] Shuffling a deck of cards

2010-08-14 Thread sharad kumar
for(i=0;i52;++i) { int r=rand()%52; swap(a[i],a[r]); } On Sat, Aug 14, 2010 at 11:46 PM, amit amitjaspal...@gmail.com wrote: write a program to shuffle an pack of cards in the most efficient way. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks