沃吗送30的KINDLE不是TOUCH啊# PDA - 掌中宝
w*x
1 楼
刚拿到offer, 发面经回馈版面. (不知道怎么发包子, 会的人教一下, 一定散尽家财.)
一切起源于9月底, 发现facebook在西雅图开了office在招聘, 于是顺手投了个简历.
Recruiter很快回复, 要求做两个中等或者难的puzzle再开始面试. 那时候工作很忙,
也就耽搁了. 一直拖到thanksgiving假期才腾出点时间做了两个中等的puzzle交上去.
facebull也做了, 本地机器上运行都没问题, 但是评卷机器人老说不对, 估计running time太
慢了.
电话面试:
Puzzle做完了就开始电面. 加州office的人打电话过来, 信号不好break up无数次最后
干脆断掉了直接在网上聊:) 题目是实现int power(int x, int y), 先写最简单的那种, 然后
写个better running time, 然后写个只用constant memory的. 最后一个constant
memory有一点tricky, 提示是用bottom-up iteration.
西雅图Onsite:
赞FB的recruiter动作都很快, 电面完了第二天就邀请去西雅图office onsite. 这个
onsite只有一轮45分钟, 其实也就是个面对面的电话面试. 题目就是把一个JSON string打印
成人能看懂的格式. 比较tricky的地方就是escape character和quoted character.
Palo Alto Onsite:
西雅图Onsite完第二天就邀请去Palo Alto面试. 不过正好到了圣诞假期, 于是拖到一
月份. 话说他们包的那个Sheraton Palo Alto酒店实在不咋地, 后面就是Caltrain的铁轨,
噪音很大. 不过campus给人感觉不错, 遇上的人都nice, 而且看上去干劲十足. (和原来公司天
壤之别啊,呵呵) Onsite一共四轮, 每个45分钟, 面了两轮之后休息和HR共进午餐. 题目如下:
1. Generate next n strings according to the following pattern:
1 (this is the input string)
11 (1 one in the previous string)
21 (2 one's in the previous string)
1211 (1 two, 1 one)
111221 (1 one, 1 two, 2 one's)
312211 (3 one's, 2 two's, 1 one)
附加题: Proof whether there is an input string that can produce a
sequence that's strictly non-increasing in length.
2. BST每个level列印一行. 说几个test case.
3. Sort colors.
有个enum叫做Color {Red, White, Blue}, 一个神奇的method叫Color getColor(int)
能把int value对应到Color上. 然后给一个int array, 要求sort the array to the
order Red, White then Blue. 只能用constant memory. 如果两个数字都对应一种颜色,
这两个数字随便怎么排. 此题我觉得是整个面试中最tricky的一道了吧. 提示是如果只有两种颜色
如何sort.
4. 设计FB首页的news feed.
5. 两个sorted array, A里面有足够的剩余空间放B, merge A and B. Give test
cases.
6. 橄榄球每次得2分3分或者7分. 给一个总分, 打印出所有可能的composition. (其实
就是硬币找零)
一切起源于9月底, 发现facebook在西雅图开了office在招聘, 于是顺手投了个简历.
Recruiter很快回复, 要求做两个中等或者难的puzzle再开始面试. 那时候工作很忙,
也就耽搁了. 一直拖到thanksgiving假期才腾出点时间做了两个中等的puzzle交上去.
facebull也做了, 本地机器上运行都没问题, 但是评卷机器人老说不对, 估计running time太
慢了.
电话面试:
Puzzle做完了就开始电面. 加州office的人打电话过来, 信号不好break up无数次最后
干脆断掉了直接在网上聊:) 题目是实现int power(int x, int y), 先写最简单的那种, 然后
写个better running time, 然后写个只用constant memory的. 最后一个constant
memory有一点tricky, 提示是用bottom-up iteration.
西雅图Onsite:
赞FB的recruiter动作都很快, 电面完了第二天就邀请去西雅图office onsite. 这个
onsite只有一轮45分钟, 其实也就是个面对面的电话面试. 题目就是把一个JSON string打印
成人能看懂的格式. 比较tricky的地方就是escape character和quoted character.
Palo Alto Onsite:
西雅图Onsite完第二天就邀请去Palo Alto面试. 不过正好到了圣诞假期, 于是拖到一
月份. 话说他们包的那个Sheraton Palo Alto酒店实在不咋地, 后面就是Caltrain的铁轨,
噪音很大. 不过campus给人感觉不错, 遇上的人都nice, 而且看上去干劲十足. (和原来公司天
壤之别啊,呵呵) Onsite一共四轮, 每个45分钟, 面了两轮之后休息和HR共进午餐. 题目如下:
1. Generate next n strings according to the following pattern:
1 (this is the input string)
11 (1 one in the previous string)
21 (2 one's in the previous string)
1211 (1 two, 1 one)
111221 (1 one, 1 two, 2 one's)
312211 (3 one's, 2 two's, 1 one)
附加题: Proof whether there is an input string that can produce a
sequence that's strictly non-increasing in length.
2. BST每个level列印一行. 说几个test case.
3. Sort colors.
有个enum叫做Color {Red, White, Blue}, 一个神奇的method叫Color getColor(int)
能把int value对应到Color上. 然后给一个int array, 要求sort the array to the
order Red, White then Blue. 只能用constant memory. 如果两个数字都对应一种颜色,
这两个数字随便怎么排. 此题我觉得是整个面试中最tricky的一道了吧. 提示是如果只有两种颜色
如何sort.
4. 设计FB首页的news feed.
5. 两个sorted array, A里面有足够的剩余空间放B, merge A and B. Give test
cases.
6. 橄榄球每次得2分3分或者7分. 给一个总分, 打印出所有可能的composition. (其实
就是硬币找零)