标签:
/* * quciksort */ public static void quickSort(Integer[] arr,Integer begin, Integer end) { Integer temp = arr[begin]; Integer left = begin; Integer right = end; if (left < right) { while (left != right) { while (arr[right] > temp && right > left) right--; arr[left] = arr[right]; while (arr[left] < temp && left < right) left++; arr[right] = arr[left]; } arr[left] = temp; quickSort(arr,begin,left-1); quickSort(arr,left+1,end); } }
标签:
原文地址:http://www.cnblogs.com/rixiang/p/4988515.html