- 博客(4)
- 收藏
- 关注
原创 Facebook面试题 Find first k common elements in n sorted arrays
Given n sorted arrays, find first k common elements in them. E.g. the common elements of {{1,3,5,7}, {3,4,5,6}, {3,5,6,8,9}, {2,3,4,5,11,18}} are 3 and 5. Analysis: In order to solve this question
2016-12-30 07:03:02 1548
原创 FaceBook面试题 Implement strStrp(String a, String b)
Implement a function strStrp(String a, String b), which returns index where any permutation of b is a substring of a. E.g. strStrp(“hello”, “ell”), return 1; strStrp(“hello”, “lle”), return 1; strS
2016-12-29 04:43:13 652
原创 Java的堆内存与栈内存的异同(Heap memory vs Stack memory)
Java Heap Memory堆内存会在Java运行时分配给对象(Object)或者JRE类。每当我们创建一个对象的时候,在对内存中就会分配一块储存空间给这个对象。Java的垃圾回收机制就是运行在堆内存上的,用以释放那些没有任何引用指向自身的对象(不可达的对象。注意Java的垃圾回收也会处理几个相互引用但没有任何外部引用的对象)。任何在堆内存中分配的对象都有全局访问权限,可以从应用的任何地方被引用
2016-12-28 04:51:18 1316
原创 Kth closest points
Given an array containing N points, find the Kth closest points >to the origin in the 2D plane. You can assume K is much >smaller than N and N is very large. Notice that the key requirement here are:”
2016-12-27 11:21:57 930
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人