最新的.Net面试题及答案(2)
发布时间:2021-06-11
发布时间:2021-06-11
high--;
}
if (key > low) {
if (array[key] < array[low]) {
array[low] = array[key] + (array[key] = array[low]) * 0;
key = low;
}
low++;
}
}
quickSort(lowest, key - 1);
quickSort(key + 1, highest);
}
/**
* @param args
*/
public static void main(String[] args) {
TestQuickSort test = new TestQuickSort();
int[] array = {6,5,2,9,7,4,0};
test.array = array;
test.quickSort(0, array.length - 1);
int length = test.array.length;
for (int i = 0; i < length; i++) {