摘要:
``` package Test01; public class QuickSprt { public static void main(String[] args) { int[] arr = { 1, 3, 2, 9, 8, 7, 1, 0,0,2,3,3,1,0,101,100,1,1,001,100 }; // 要排序的数组 QuickSort(arr); for ... 阅读全文
posted @ 2019-03-14 14:30
Suppperfly
阅读(152)
评论(0)
推荐(0)
摘要:
``` package Test01; /* * (荷兰国旗问题) * 给定一个数组arr,和一个数num,请把小于num的数放在数组的 左边,等于num的数放在数组的中间,大于num的数放在数组的 右边。 * 要求额外空间复杂度O(1),时间复杂度O(N) */ public class NtherlandsFlag { public static void main(String... 阅读全文
posted @ 2019-03-14 12:03
Suppperfly
阅读(89)
评论(0)
推荐(0)

浙公网安备 33010602011771号