package basic.day05; import java.util.Arrays; public class SortDemo { public static void main(String[] args) { int[] ary = {8,5,2,1,6,4}; //selectionSort(ary); //bubbleSort(ary); insertSort(ary); System.out.println(Arrays.toString(ary)); } /** 插入式排序, 将后组每个元素取出与前组逐一比较,找到位