标签:
public class Main { public static void main(String[] args) { int[] A = { 6, 4, 3, 5, 6, 2 }; for (int j = 1; j < A.length; j++) { int key = A[j]; int i = j - 1; while (i >= 0 && A[i] > key) { A[i + 1] = A[i]; i--; } A[i + 1] = key; } } }
标签:
原文地址:http://www.cnblogs.com/hackyo/p/5891467.html