java实现快速排序
对一个数组进行快速排序,此时代码性能还未优化,也就是最容易理解的样子。
import java.util.Arrays;
public class QuickSort {
public static void main(String[] args) {
int[] A = { -9, 78, 0, 23, -567, 70, -1, 900, 4561 };
quickSort(A, 0, A.length - 1);
System.out.println(Arrays.toString(
原创
2020-05-12 16:29:59 ·
111 阅读 ·
0 评论