A家面试题# JobHunting - 待字闺中
l*h
1 楼
做手机的那个A,希望对同胞们有用。
每次都是两个人一起面,总共五六组,所以总共要见十个还是十二个。记得的问题:
1. Find the lonely celebrity(celebrity: everyone knows him, he knows no one)
. Given a function boolean knows(A, B), which tells you if A knows B.
Implement function: List getLonelyCelebrity(Set names).
2. You got 2^40 positive 4 byte integers on disk, 16M memory, how to find
the first missing integer.
3. Implement the merge of multiple inputs. (I assumed each input implements
hasNext(), next())
4. Reverse a byte array, Reverse a char array (variant length char)
5. A row of hosts, from left to right, find a method to calculate the total
number of hosts. Each host can invoke: isLeft, isRight, sendToLeft,
sendToRight.
6. On cellphone keyboard, each number corresponds to several chars. Given a
list numbers, e.g. 1224668332, find the longest valid word (dict is given).
7. Reverse a list in Java, complexity?
8. design: a remote service+DB to keep top 100 scores for a game. It's a
single player game, and played on mobile device. Requirement: every time an
user starts to play, show the current top 100 scores.
9. design: java process同步的问题, 一堆write process,一开始write process要共
同agree一个数,比如100,那么就产生100个文件。完了之后一堆read process开始,去
consume这些文件。
10. 一个permutation相关的问题,记不得细节了
每次都是两个人一起面,总共五六组,所以总共要见十个还是十二个。记得的问题:
1. Find the lonely celebrity(celebrity: everyone knows him, he knows no one)
. Given a function boolean knows(A, B), which tells you if A knows B.
Implement function: List
2. You got 2^40 positive 4 byte integers on disk, 16M memory, how to find
the first missing integer.
3. Implement the merge of multiple inputs. (I assumed each input implements
hasNext(), next())
4. Reverse a byte array, Reverse a char array (variant length char)
5. A row of hosts, from left to right, find a method to calculate the total
number of hosts. Each host can invoke: isLeft, isRight, sendToLeft,
sendToRight.
6. On cellphone keyboard, each number corresponds to several chars. Given a
list numbers, e.g. 1224668332, find the longest valid word (dict is given).
7. Reverse a list in Java, complexity?
8. design: a remote service+DB to keep top 100 scores for a game. It's a
single player game, and played on mobile device. Requirement: every time an
user starts to play, show the current top 100 scores.
9. design: java process同步的问题, 一堆write process,一开始write process要共
同agree一个数,比如100,那么就产生100个文件。完了之后一堆read process开始,去
consume这些文件。
10. 一个permutation相关的问题,记不得细节了