Linkedin 近期电面整理

Linkedin 近期电面,LinkedIn的题库比较小,有概率遇到原题:

基础知识问题:

  1. java 内存空间,heap stack 的作用
  2. interface, abstract
  3. synchronized, volatile
  4. Throwable: Error, Exception
  5. java garbage collection
  6. synchronized vs ReentrantLock
  7. HTTP TCP UDP
  8. deadlock
  9. mutex vs semaphore
  10. final finalize finally

算法问题:

  1. leetcode 53 Maximum Subarray 和 152 Maximum Product Subarray 两题经常一起出现
  2. leetcode 170 Two Sum III - Data structure design
  3. leetcode 339 Nested List Weight Sum 和 leetcode 364 Nested List Weight Sum II 两题经常一起出现
  4. leetcode 151 Reverse Words in a String
  5. leetcode 380 Insert Delete GetRandom O(1)
  6. leetcode 468 Validate IP Address
  7. leetcode 173 Binary Search Tree Iterator
  8. leetcode 50 Pow(x, n)
  9. leetcode 516 Longest Palindromic Subsequence
  10. leetcode 65 Valid Number
  11. leetcode 236 Lowest Common Ancestor of a Binary Tree
  12. leetcode 23 Merge k Sorted Lists
  13. leetcode 46 permutation
  14. leetcode 352 Data Stream as Disjoint Intervals
  15. 一个等概率随机生成0或1的function,利用它写一个function等概率随机返回[0,1,2,3,4,5]中一个数, 经过提示用bits做
  16. polish notation的计算 [1,2,3,+,*]
  17. binary search 的应用, 找到比自己大一号的字母
    arr = [a,b,d,f,v,z], key = z, ret= a
    arr = [a,b,d,f,v,z], key = b, ret= d
1 Like

领英考原题的概率非常高

报个店面:

Union of two sorted arrays

/**
*  @param a - a list of non null integers, in ascending order
*  @param b - a list of non null integers, in ascending order
*  @return the integers that are contained in either a or b, in ascending order
*/

List<Integer> union(List<Integer> a, List<Integer> b);

Follow up: Given access to multicore processor, how would you implment the same function so that we can do an union faster (in terms of time complexity)
Hint: split the inputs to perform union and merge them back in O(1) time.