随笔分类 -  排序

摘要:[9, 7, 1, 5][1, 5, 9, 7]1579 阅读全文
posted @ 2017-12-21 21:21 tonggc1668 阅读(80) 评论(0) 推荐(0)
摘要:public class ShellSort { public static void main(String[] args) { int A[] = { 5, 2, 9, 4, 7, 6, 1, 3, 8 };// 从小到大希尔排序 sort(A,A.length); for (int i = 0; i = 1) { for (int i = h... 阅读全文
posted @ 2017-12-16 12:19 tonggc1668 阅读(106) 评论(0) 推荐(0)
摘要:[2, 3, 4, 5, 6, 8] 阅读全文
posted @ 2017-08-19 21:00 tonggc1668 阅读(104) 评论(0) 推荐(0)
摘要:import org.apache.commons.lang.builder.CompareToBuilder;Collections.sort(outboundNotices, new Comparator() { @Override public int compare(OutboundNoticePrintRespV... 阅读全文
posted @ 2017-08-16 15:56 tonggc1668 阅读(270) 评论(0) 推荐(0)
摘要:reverse-pairs 阅读全文
posted @ 2017-08-08 13:25 tonggc1668 阅读(70) 评论(0) 推荐(0)