

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Exam; Professor: Hertz; Class: Computer Program for Science; Subject: Computer Science; University: Canisius College; Term: Unknown 1989;
Typology: Exams
1 / 3
This page cannot be seen from the preview
Don't miss anything!
algorithm shuffle(int[] deck ) int first [6], last [6]; int i ; for i = 0 to 5, inclusive, increasing by 1 each iteration set the i th^ element in first to i th^ element in deck set the i th^ element in last to ( i + 6 ) th^ element in deck end for for i = 0 to 11, inclusive, increasing by 2 each iteration set the i th^ element in deck to ( i /2 ) th^ element in first set the ( i +1 ) th^ element in deck to ( i /2 ) th^ element in last end for