1、
import java.io.*;
import java.math.*;
import java.util.*;
public class Algr{
public static int array[] = new int[]{3, 9, 1, 2, 8, 11, 34, 21, 0, 23, 22, 10, 14, 2};
public enum Type{Bubble, Selection, Insert, Shell, Counter, Quick};
public static void main(String[] args){
sort(array, Type.Bubble);
random(array);
sort(array, Type.Selection);
random(array);
sort(array, Type.Insert);
random(array);
sort(array, Type.Shell);
random(array);
sort(array, Type.Counter);
random(array);
sort(array, Type.Quick);
}
public static void random(int[] array){
Random random = new Random();
int n = array.length;
for(int i=0; i< n; i++){
swap(array, i, Math.abs(random.nextInt() % n));
}