case prisCount sravCount int newArray1 new int array length for int ar

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
case 1:
prisCount = 0;
sravCount = 0;
int[] newArray1 = new int[array.length];
for (int i = 0; i < array.length; i++) newArray1[i] = array[i];
Date startTime1 = new Date();
for (int i = 0; i < k; i++)
bubbleSort(newArray1);
Date endTime1 = new Date();
System.out.println("Время работы: " + (endTime1.getTime() - startTime1.getTime())/k);
int c1 = sravCount/k;
System.out.println("Количество сравниваний: " + c1);
System.out.println("Количество присвоений: " + prisCount/k);
printArray(newArray1);
System.out.println("--------------------------------------------------------------------------------------------");
break;