- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 需要了解的知识点
Heavy hitters[edit]Find the most frequent (popular) elements in a data stream. Some notable algorithms are:Boyer–Moore majority vote algorithmKarp-Papadimitriou-Shenker algorithmCount-Min sk
2016-10-26 11:02:04 217
转载 String 有关概念
转载自:http://cymoft.blog.51cto.com/324099/473220/Java面试中总喜欢出几个关于String对象的题,比如:1.String s = new String("abc");创建了几个String对象。2.String s1 = "abc"; String s2 = "a"; String s3 = s2 + "bc"
2015-07-01 12:47:31 211
原创 JAVA 常用数据结构操作
1. Queueoffer(E);poll();peek();isEmpty();2.Deque (代替stack)offerLast(E) / offerFirst(E)pollLast() / pollFirst()peekLast() / peekFirst()isEmpty()
2015-06-21 02:42:09 189
原创 Permutation 各种变种
import java.util.ArrayList;import java.util.HashSet;import java.util.List;import java.util.Set;Find all possible combinations of k numbers that add up to a number n, given that only number
2015-06-21 01:39:54 210
原创 Complete Tree 的一些知识点
1.如果一个complete tree 所有的Node都有2个子Node,那么它就是一个full-tree,那么如果depth是n,所有node的个数就是2 ^0 + 2^1 + 2^2 + ....+2^n =2^(n + 1) - 12.depth 的定义,当只有root node的时候,depth = 0, 也就是说3个Node的full-tree的depth是1.
2015-06-14 04:31:49 459
转载 K smallest in array with detail explanation
I am working at Microsoft Bing as an intern this summer. To get an internship I had lots of interviews with various tech companies this year, and this was my favorite question: In an integer array wit
2015-06-11 07:32:13 209
原创 常用的技巧和知识点整合
1.在Array中取到一对一对的数,如1,2,3,4,5变成(1,2) (3,4) (5):方法:int i = 0;for (; i int num1 = arr[i * 2];int num2 = arr[i*2 + 1];}if (i * 2 int last = arr[i * 2];//个数为奇数的时候取得最后一位数字}
2015-06-10 12:21:59 364
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人