Number of Comparisons between selection sort and bubble sort keep coming up the same
问题 I have written this program to compare the number of operations needed to sort a random numbers using both selection and bubble sort. However, these numbers keep coming up the same and I can't figure out where my code went wrong. static int num_comps; public static void main(String[] args) { Random rnd = new Random(); // max size of array // number of N inputs int array_size = 32768; int num_datasets = 12; // allocate array once to the max size int[] vals = new int[array_size]; // temp array