Empirical shuffle check. Run computational experiments to check that our shuffling code works as advertised. Write a
Question:
Empirical shuffle check. Run computational experiments to check that our shuffling code works as advertised. Write a program ShuffleTest that takes two integer command-line arguments m and n, does n shuffles of an array of length m that is initialized with a[i] = i before each shuffle, and prints an m-by-m table such that row i gives the number of times i wound up in position j for all j. All values in the resulting array should be close to n / m.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Introduction To Programming In Java An Interdisciplinary Approach
ISBN: 9780672337840
2nd Edition
Authors: Robert Sedgewick, Kevin Wayne
Question Posted: