JAVA必会算法--冒泡排序

pop(int[] a){

  for(int i = 0;i<a.length;i++){

    for(int j=a.lenght-1;j>0;j++){

      if(a[j]>a[j+1]){

        int tmp = a[j];

        a[j] = a[j+1];

        a[j+1] = tmp; 

      }

    }

  }

}

原文地址:https://www.cnblogs.com/fastLearn/p/6742862.html