avatar
v*d
1
跟FB同一周面的……今天催L的recruiter,催来了个悲剧……
总共电面2轮,onsite5轮 - 其中2轮coding,2轮resume check和project,1轮design
……算上电面,总共面了11道……题目顺序已打乱:
1. given the list {{1,1},2,{1,1}},返回10……因为,(four 1's at depth 2, one
2 at depth 1). 给定 {1,{4,{6}}} ,返回27……因为, (one 1 at depth 1, one 4
at depth 2, and one 6 at depth 3)
2. leetcode: traversal binary tree level by level
3. 给2个string,判断是否可以map. say (foo, abb) 这2个string是可以map的, f->a
, o->b. say (foo, sdf),是不可以map的……返回bool值
4. 给一个string,每10个letter一组,输出所有出现次数超过一次的strings with
length of 10. 一定要用rolling hashing做
5. 给一个数组,输出连续元素的最大和。
6. 判断2个linkedlist是否在某一点会重合. O(1) space.
7. leetcode: Max Points on a Line
8. string reverse. 输入 "Hello, word", 输出 "word Hello,".
9. 给一个数组,输出连续元素的最大乘积。
10. leetcode: permutations
11. 给一个数组,a(10, 2, 5)……输出一个数组, b(10, 50, 20)……b[i]是除了a[i
]以外剩下a中所有元素的乘积……不准用除法.
L家是有题库的,把版上的面经都看一遍就差不多了……
design是设计amazon product page的后端
非常感谢版上大牛们的帮助……感谢版主done一直以来热心的帮助……感谢dongfeiwww
大牛的内推……感谢2爷的帮助……
准备的话,主要是还是leetcode+版上面经……第一遍的时候刷得挺慢的,后来慢慢好
些……刚开始做的时候可能想的是尽快把所有题目做完……在做第二遍的时候更多的是
想着这题还可以用其他什么方法来做……比如之前用recursive,这次可能用iterative
来做……第三遍的时候,会把做得不熟的题目记下来,然后专门再做几次……我当时给
自己的要求是,onsite之前要达到leetcode随便一道题,在10分钟之内可以写出一次性
提交通过的程序……
EPI是本好书……上面的题目感觉很难……个人感觉超过了FB和L的题目难度……在
leetcode做得滚瓜烂熟了以后,可以做做这本书……
design的话,因为master做的东西跟distributed system相关的,所以感觉面试得时候
还是比较顺的……所以对于还在学校的学生,可以多选些distributed system相关的课
程……感兴趣的话,可以去找做distributed system研究的research lab去做做……
最后,再次感谢版上的大牛们和leetcode……从版上学到了很多东西,希望上面写的这
些也可以帮助到的其他的人……祝大家马上拿OFFER!
avatar
g*y
2
香港一所大学 computer science PhD,现在做computational biology postdoc,
文章 15 篇, journal 8 篇 (5篇一作),conference 7篇(5篇一作),
引用120+,
review 13篇(9篇for杂志,4篇for会议)。
自知只是在追求 bottom line,
请大侠帮看看,谢谢!。
avatar
z*y
3
赞 顶 祝楼主拿到fb的offer

design
one
4
>a

【在 v***d 的大作中提到】
: 跟FB同一周面的……今天催L的recruiter,催来了个悲剧……
: 总共电面2轮,onsite5轮 - 其中2轮coding,2轮resume check和project,1轮design
: ……算上电面,总共面了11道……题目顺序已打乱:
: 1. given the list {{1,1},2,{1,1}},返回10……因为,(four 1's at depth 2, one
: 2 at depth 1). 给定 {1,{4,{6}}} ,返回27……因为, (one 1 at depth 1, one 4
: at depth 2, and one 6 at depth 3)
: 2. leetcode: traversal binary tree level by level
: 3. 给2个string,判断是否可以map. say (foo, abb) 这2个string是可以map的, f->a
: , o->b. say (foo, sdf),是不可以map的……返回bool值
: 4. 给一个string,每10个letter一组,输出所有出现次数超过一次的strings with

avatar
w*s
4
review是不是再多点更好?
avatar
n*1
5
问下LZ能否详细讲下第四题 没看明白
avatar
g*y
6
多谢意见!

【在 w*********s 的大作中提到】
: review是不是再多点更好?
avatar
p*e
8
Good enough. I only reviewed 10 ms but got approved in TSC

【在 g**y 的大作中提到】
: 香港一所大学 computer science PhD,现在做computational biology postdoc,
: 文章 15 篇, journal 8 篇 (5篇一作),conference 7篇(5篇一作),
: 引用120+,
: review 13篇(9篇for杂志,4篇for会议)。
: 自知只是在追求 bottom line,
: 请大侠帮看看,谢谢!。

avatar
l*t
9
多谢. Bless
avatar
b*s
10
谢面经
avatar
q*c
11
EPI是哪本书?

design
one
4
>a

【在 v***d 的大作中提到】
: 跟FB同一周面的……今天催L的recruiter,催来了个悲剧……
: 总共电面2轮,onsite5轮 - 其中2轮coding,2轮resume check和project,1轮design
: ……算上电面,总共面了11道……题目顺序已打乱:
: 1. given the list {{1,1},2,{1,1}},返回10……因为,(four 1's at depth 2, one
: 2 at depth 1). 给定 {1,{4,{6}}} ,返回27……因为, (one 1 at depth 1, one 4
: at depth 2, and one 6 at depth 3)
: 2. leetcode: traversal binary tree level by level
: 3. 给2个string,判断是否可以map. say (foo, abb) 这2个string是可以map的, f->a
: , o->b. say (foo, sdf),是不可以map的……返回bool值
: 4. 给一个string,每10个letter一组,输出所有出现次数超过一次的strings with

avatar
f*n
13
根据c++ 64位整数的设定,题目的10位hash编码可以用2^5为底数,包括0-31
可以包括26个字母,这样编码解码代码如下,unsigned long long 是64位
不会越界,但是unsigned long和int相同,不足50位会导致越界,hash代码如下
unsigned long long rollinghash(string s)
{
unsigned long long res=0;
for(int i=0; i < 10; i++)
{
unsigned long long tmp = s[i] - 'a';
if (tmp >= 0 && tmp <= 25)
{
tmp = tmp << (i*5);
res |= tmp;
}
}
return res;
}

【在 v***d 的大作中提到】
: http://www.mitbbs.com/article_t/JobHunting/32580833.html
avatar
l*3
14
请问楼主,第十一题怎么做?在版上看到很多次,但是还是不知道解法,先谢谢了~

design
one
4
>a

【在 v***d 的大作中提到】
: 跟FB同一周面的……今天催L的recruiter,催来了个悲剧……
: 总共电面2轮,onsite5轮 - 其中2轮coding,2轮resume check和project,1轮design
: ……算上电面,总共面了11道……题目顺序已打乱:
: 1. given the list {{1,1},2,{1,1}},返回10……因为,(four 1's at depth 2, one
: 2 at depth 1). 给定 {1,{4,{6}}} ,返回27……因为, (one 1 at depth 1, one 4
: at depth 2, and one 6 at depth 3)
: 2. leetcode: traversal binary tree level by level
: 3. 给2个string,判断是否可以map. say (foo, abb) 这2个string是可以map的, f->a
: , o->b. say (foo, sdf),是不可以map的……返回bool值
: 4. 给一个string,每10个letter一组,输出所有出现次数超过一次的strings with

avatar
v*d
15
assume size of a is n
用2个数组
prev[i] = a[0]*a[1]*...*a[i]
back[i] = a[i]*a[i+1]*...*a[n-1]
结果
res[i] = prev[i-1] * back[i+1]
注意处理下边界情况

【在 l********3 的大作中提到】
: 请问楼主,第十一题怎么做?在版上看到很多次,但是还是不知道解法,先谢谢了~
:
: design
: one
: 4
: >a

avatar
l*a
16
谢谢分享

design
one
4
>a

【在 v***d 的大作中提到】
: 跟FB同一周面的……今天催L的recruiter,催来了个悲剧……
: 总共电面2轮,onsite5轮 - 其中2轮coding,2轮resume check和project,1轮design
: ……算上电面,总共面了11道……题目顺序已打乱:
: 1. given the list {{1,1},2,{1,1}},返回10……因为,(four 1's at depth 2, one
: 2 at depth 1). 给定 {1,{4,{6}}} ,返回27……因为, (one 1 at depth 1, one 4
: at depth 2, and one 6 at depth 3)
: 2. leetcode: traversal binary tree level by level
: 3. 给2个string,判断是否可以map. say (foo, abb) 这2个string是可以map的, f->a
: , o->b. say (foo, sdf),是不可以map的……返回bool值
: 4. 给一个string,每10个letter一组,输出所有出现次数超过一次的strings with

avatar
l*a
17
第一题用什么类型定义参数呢?
List ?

design
one
4
>a

【在 v***d 的大作中提到】
: 跟FB同一周面的……今天催L的recruiter,催来了个悲剧……
: 总共电面2轮,onsite5轮 - 其中2轮coding,2轮resume check和project,1轮design
: ……算上电面,总共面了11道……题目顺序已打乱:
: 1. given the list {{1,1},2,{1,1}},返回10……因为,(four 1's at depth 2, one
: 2 at depth 1). 给定 {1,{4,{6}}} ,返回27……因为, (one 1 at depth 1, one 4
: at depth 2, and one 6 at depth 3)
: 2. leetcode: traversal binary tree level by level
: 3. 给2个string,判断是否可以map. say (foo, abb) 这2个string是可以map的, f->a
: , o->b. say (foo, sdf),是不可以map的……返回bool值
: 4. 给一个string,每10个letter一组,输出所有出现次数超过一次的strings with

avatar
v*d
18
public interface N {
boolean isInteger();
Integer getInteger();
List getList();
}
这是题目给的,不用实现,直接可以用

【在 l*****a 的大作中提到】
: 第一题用什么类型定义参数呢?
: List ?
:
: design
: one
: 4
: >a

avatar
l*3
19
十分感谢!

【在 v***d 的大作中提到】
: assume size of a is n
: 用2个数组
: prev[i] = a[0]*a[1]*...*a[i]
: back[i] = a[i]*a[i+1]*...*a[n-1]
: 结果
: res[i] = prev[i-1] * back[i+1]
: 注意处理下边界情况

avatar
y*n
20
第一个要建造树吗?
avatar
t*7
21
谢谢分享
avatar
r*e
22
谢谢面经!为什么说那道题一定要用rolling hash呢?面试官说的吗?谢谢。
avatar
v*d
23
不用……直接递归就好……

【在 y***n 的大作中提到】
: 第一个要建造树吗?
avatar
v*d
24
是的……他不会直接说什么方法,但是会让你说出你的方法的时间复杂度,然后让你优
化……

【在 r*****e 的大作中提到】
: 谢谢面经!为什么说那道题一定要用rolling hash呢?面试官说的吗?谢谢。
avatar
t*5
25
请问楼主L的题库从哪儿找的
avatar
t*i
26
mark
avatar
v*d
27
在google里输入
site:mitbbs.com l 面经
site:mitbbs.com linkedin 面经
后面的关键字你可以自己换……

【在 t******5 的大作中提到】
: 请问楼主L的题库从哪儿找的
avatar
t*5
28

哈,多谢

【在 v***d 的大作中提到】
: 在google里输入
: site:mitbbs.com l 面经
: site:mitbbs.com linkedin 面经
: 后面的关键字你可以自己换……

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。