apple/box/pocket gems等面经

原帖地址:一亩三分地

发一些最近自己面试过的公司面经(全部是店面)

apple
icloud 组
1. serialize and deserialize a regular tree(Note that, it is not a binary tree)

box
1. Given two arrays A and B, find out their intersection
2. Roman to Integer

Pocket Gems
1. Implement strStr, could you do KMP?
2. Given an array of integers, find out the top k most repeating integers
Example:
1,1,1,1,2,2,2,3,5
k =1, return 1
k =2, return 1 and 2

Machine Zone
1. Reverse Linked List
2. insertion sort linked list
3. Concurrent queue