电话面经(Microsoft, Amazon, Google, ...)# JobHunting - 待字闺中
a*m
1 楼
最近面了好几个公司,把题目和经验分享一下攒人品求祝福:
Amazon 两轮:
Round 1:
1. C++ Copy Constructor, 包括接口和deep vs. shallow的区别,这题答得一般,有些
细节没搞得特别透彻
2. Hash Table的实现和技术要点 (仔细看过一遍wiki就没问题了)
3. Large file, multiple lines, how to get any line in equal probablity. 这题
可以问得很深入,比如文件太大内存无法装入如何办。
我回答的思路:
内存够文件内容就都装入内存,然后randomGenerator选一行,one pass
内存不够可以记录每行的偏移值在内存,这样之后可以fseek到那一行去读取
如果偏移值都放不下,可以divide into ranges, 当然这个range的stepsize不好选,可
以预估,也可以动态改变(到这一层其实大致给些思路就ok了)
Round 2:
1. Research problem
2. How to build a service to generate an unique number for each client reque
st, 这个问题也可以问得很深入。
我回答的思路:
systemTime + IP --> IP不唯一 --> systemTime + ConnectionID
multiple requests --> build a distributed service so we need add hardware si
gniture to make sure the unqiueness
Another solutions is building a hashTable to store all generated numbers for
a check before sending number to client
拿到Onsite ...
Microsoft:
Some behavior questions
Singleton pattern concept, write a Singleton class (in multithreading enviro
nment)
拿到Onsite ... (特别感谢一位谈不上很熟的朋友给了很多帮助,所以这个onsite拿得
最顺利)
a startup:
String2int, 这题不难,但要考虑很多细节,比如+/-号,溢出等
Hash Table 实现与技术要点,与stl:map的区别和优劣
finding missing integer (enough memory solution, not enough memory solution)
, 基本上就是用bit-vector的思路,如果内存不够就1bit to a range
拿到Onsite ...
Google
Round 1:
1. 矩阵乘法 (紧张导致脑袋不清晰,虽然最后代码正确但中间出了挺多纰漏)
2. 一些基础的数据结构,arrary, list, hash, tree等等
虽然自我感觉糟糕还是被容许第二次电话面试
Round 2 (一个语气挺tough的同胞):
1. 股票的买入卖出,max the profit, 如果有多个pair产生max profit如何处理(这题
因为自己编程做过所以答得应该挺好)
2. general questions for image search, 问题挺笼统的,但我自己觉得都答到不错,
基本要点都没遗漏
被拒了,而且是拒在国人手上,看来面试碰到同胞还真的不是好事...
希望接下来的几个onsite能顺利过关~
Amazon 两轮:
Round 1:
1. C++ Copy Constructor, 包括接口和deep vs. shallow的区别,这题答得一般,有些
细节没搞得特别透彻
2. Hash Table的实现和技术要点 (仔细看过一遍wiki就没问题了)
3. Large file, multiple lines, how to get any line in equal probablity. 这题
可以问得很深入,比如文件太大内存无法装入如何办。
我回答的思路:
内存够文件内容就都装入内存,然后randomGenerator选一行,one pass
内存不够可以记录每行的偏移值在内存,这样之后可以fseek到那一行去读取
如果偏移值都放不下,可以divide into ranges, 当然这个range的stepsize不好选,可
以预估,也可以动态改变(到这一层其实大致给些思路就ok了)
Round 2:
1. Research problem
2. How to build a service to generate an unique number for each client reque
st, 这个问题也可以问得很深入。
我回答的思路:
systemTime + IP --> IP不唯一 --> systemTime + ConnectionID
multiple requests --> build a distributed service so we need add hardware si
gniture to make sure the unqiueness
Another solutions is building a hashTable to store all generated numbers for
a check before sending number to client
拿到Onsite ...
Microsoft:
Some behavior questions
Singleton pattern concept, write a Singleton class (in multithreading enviro
nment)
拿到Onsite ... (特别感谢一位谈不上很熟的朋友给了很多帮助,所以这个onsite拿得
最顺利)
a startup:
String2int, 这题不难,但要考虑很多细节,比如+/-号,溢出等
Hash Table 实现与技术要点,与stl:map的区别和优劣
finding missing integer (enough memory solution, not enough memory solution)
, 基本上就是用bit-vector的思路,如果内存不够就1bit to a range
拿到Onsite ...
Round 1:
1. 矩阵乘法 (紧张导致脑袋不清晰,虽然最后代码正确但中间出了挺多纰漏)
2. 一些基础的数据结构,arrary, list, hash, tree等等
虽然自我感觉糟糕还是被容许第二次电话面试
Round 2 (一个语气挺tough的同胞):
1. 股票的买入卖出,max the profit, 如果有多个pair产生max profit如何处理(这题
因为自己编程做过所以答得应该挺好)
2. general questions for image search, 问题挺笼统的,但我自己觉得都答到不错,
基本要点都没遗漏
被拒了,而且是拒在国人手上,看来面试碰到同胞还真的不是好事...
希望接下来的几个onsite能顺利过关~