标签:sort amp pre 快速排序 return span class void java
public static void quckSort(int[] arry,int low ,int high){ if (low < high) { int middle = getMiddle(arry, low, high); quckSort(arry, low, middle - 1); quckSort(arry, middle + 1, high); } } public static int getMiddle(int[] arry,int low ,int high){ int temp = arry[low] ; while (low < high){ while (low < high && arry[high] >= temp ){ high-- ; } arry[low] =arry[high] ; while (low < high && arry[low] <= temp){ low++ ; } arry[high] = arry[low] ; } arry[low] =temp; return low ; }
标签:sort amp pre 快速排序 return span class void java
原文地址:https://www.cnblogs.com/52hadoop/p/9739822.html