标签:i++ close col closed code sed none void one
1 void quicksort (int array[], int l, int r) { 2 if (l < r) { 3 int i = l, j = r, x = array[i]; 4 5 while (i < j) { 6 while (i < j && array[j] >= x) { 7 j--; 8 } 9 if (i < j) { 10 array[i] = array[j]; 11 i++; 12 } 13 14 while (i < j && array[i] < x) { 15 i++; 16 } 17 if (i < j) { 18 array[j] = array[i]; 19 j--; 20 } 21 } 22 array[i] = x; 23 24 quicksort(array, l, i-1); 25 quicksort(array, i+1, r); 26 } 27 }
标签:i++ close col closed code sed none void one
原文地址:https://www.cnblogs.com/zymmyz/p/12737896.html