数据结构与算法
SpringHerald
Calm down to study. Don't be blundering.
展开
-
LeetCode解题思路总结
还是写个博客总结一下在LeetCode上刷的题吧....不然做过的题的解法都忘了....582. Kill Process使用HashMap遍历数组,在O(N)时间内建树,然后搜索原创 2017-06-03 15:45:09 · 521 阅读 · 0 评论 -
牛客网编程题总结
网易2017春招 - 双核处理https://www.nowcoder.com/question/next?pid=4575457&qid=83062&tid=9513284一数组分成两部分使得差最小如何联想到背包问题:使两部分差最小即其中一部分尽可能接近sum/2。即转化成问题:将该数组尽可能填满sum/2。原创 2017-08-05 10:30:25 · 1220 阅读 · 0 评论 -
Java Arrays.sort和Collections.sort的简洁写法
Arrays.sortclass A { int x; A(int x) { this.x = x; }}public class Main { public static void main(String[] args) { A[] a = new A[4]; a[0] = new A(3);原创 2017-08-05 21:50:40 · 550 阅读 · 0 评论