摘要: 刷leetcodecode时看到一道题需要利用自定义的比较器进行排序,最开始一头雾水,看了API终于懂了~ Arrays.sort(T[] a,Comparator<? super T> c)可以根据比较器的compare方法对数组进行排序,compare方法的不同实现对应着不同的排序准则; 可以看 阅读全文
posted @ 2016-12-15 14:59 冷面君要做个coder 阅读(2047) 评论(0) 推荐(0) 编辑