CSC 1351 Chapter : 1351 Practice 1
Document Summary
Practice questions (not homework) for short in-class quiz on tuesday jan 21. Give the number of permutations of {0, 1, 2, 3, 4} (don"t giv e a formula) and an example which is not a permutation. Fill the blanks below to state the two main things we want to address in this course. (1) , (2) , Rewrite the code below in the best way (to avoid unnecessary comparisons inside a loop). for (i=0; i permutation[i]") to compute numpairsoutoforder for a given permutation: show the random permutation that would be generated by the ef cient method if the succeesive random numbers were 5, Also, show the successive random numbers that would give rise to the random permutation [5,