排序算法之快速排序 JAVA快速排序算法

        public static void quickSort(int[] arr, int low , int height){
int l=low, h = height;
if(low < height){
int temp = arr[low];
while(low < height){ while(low < height && temp < arr[height]){
height --;
}
arr[low] = arr[height]; while(low < height && temp > arr[low]){
low ++;
}
arr[height] = arr[low];
arr[low] = temp;
}
quickSort(arr, l, low-1);
quickSort(arr, low+1, h);
} }
上一篇:centos7 初始化脚本


下一篇:回车”(carriage return)和”换行”(line feed)的区别和来历-(附:ASCII表)