avatar
l*c
1
前前后后面了四个月 电面面了两次 第一次onsite结束以后 Hiring Committee要求加
面一次两轮的onsite 周五HR电话打来说offer还是不能approve 决定move-on 接着面别
的家了
攒人品 求refer
Phone 1st
1. Hash table (collision, probability)
2. Generate fuzzy words (Not in dictionary, but look like the given
strings)
implement build() and nextWord();
e.g. ["APE", "APPLE", "ACE"] -> "ACE" (randomly)
Phone 2nd
1. Lowest common ancestor
2. Can't remember
Onsite 1st
1 White Female Mira
1.1 Find intersection from two lists
1.2 How many 0s tailing in N!
2 Indian Male
2.1 10 buttons passcode with 4 digitals. Generate a sequence to
brute force it. Upper bound and lower bound of length, code to
generate an optimal one.
3 White Male geek
3.1 Guess how a PDF file is structured
3.2 How to present a rectangle. Check two rectangle is intersected
3.3 Program structure.
3.4 Run Unit twice, passed the first time, and failed at the
second. Why?
3.5 Forced context switching
Lunch Steve
4 ABC Male
4.1 Design a system to upgrade patches on remote data center
How to transfer the patch
How to install patch between computers (in the data center), fast and
safe
If error happens, how to fix it
What will make this system down
Onsite 2nd
1 White Male
1.1 A function to validate UTF-8 String
1.2 How to break down a the watch-video page
1.3 Design a system to server video thumbs
2 White Male
1.1 Design a class to serialize and deserialize an object
avatar
x*o
2
相当强了
猜测下你第一次栽烙印手里
avatar
z*e
3
有难度
我也怀疑你挂在阿三手里
阿三那个问题有啥特别好的方法没?
avatar
f*b
4
楼主再接再厉,应该有别家的offer了吧
avatar
l*c
5
HR说 是因为第一次写code的题太少 要加面

【在 x****o 的大作中提到】
: 相当强了
: 猜测下你第一次栽烙印手里

avatar
P*2
6
这些题好难。。。还serialize 。。汗
avatar
l*c
7
那个是这样的 如果个passcode不用前面的 也就是upper bound = 40k 如果每次都用前
面三个 就是 10k + 3
代码的话 用1000个bucket记录生成了的 然后每次找没生成的 就行
最后证明了一下 10k + 3的能生成

【在 z****e 的大作中提到】
: 有难度
: 我也怀疑你挂在阿三手里
: 阿三那个问题有啥特别好的方法没?

avatar
m*i
8
mark
avatar
r*n
9
Design a class to serialize and deserialize an object
思路是什么呢?
char* ptr = reinterpret_cast(&Obj);
ofstream out("file", ios::binary|ios::out);
out.write(ptr, sizeof(Obj));
avatar
l*c
10
第一个 序列化member就好了 但不要用reinterpret_cast
我当时给的设计
4 bytes - How many members, let's say k members
4 * k bytes - size of each member
n bytes - members
然后设计一个register member的function
需要注意 比如 char *跟char这样的 不能用同一个方法注册 需要用一下overload

【在 r*********n 的大作中提到】
: Design a class to serialize and deserialize an object
: 思路是什么呢?
: char* ptr = reinterpret_cast(&Obj);
: ofstream out("file", ios::binary|ios::out);
: out.write(ptr, sizeof(Obj));

avatar
a*a
11
还是不是太明白题目。是说有一个十位的密码,已知只用了四个数字,然后要暴力猜密
码么?四个数字是已知的么,还是0-9中某四个?“不用前面的”和“用前面三个”是
什么意思呢?

【在 l*****c 的大作中提到】
: 那个是这样的 如果个passcode不用前面的 也就是upper bound = 40k 如果每次都用前
: 面三个 就是 10k + 3
: 代码的话 用1000个bucket记录生成了的 然后每次找没生成的 就行
: 最后证明了一下 10k + 3的能生成

avatar
l*c
12
密码由 0-9组成 有四位 场景是你在上面连续按键 比如按得"12345"
就先用"1234"去匹配密码 然后"2345" 如果密码对了 门就开了
需要生成一个序列 一定能打开这个门

【在 a*****a 的大作中提到】
: 还是不是太明白题目。是说有一个十位的密码,已知只用了四个数字,然后要暴力猜密
: 码么?四个数字是已知的么,还是0-9中某四个?“不用前面的”和“用前面三个”是
: 什么意思呢?

avatar
e*s
13
楼主能不能详细点证明一下这题?

【在 l*****c 的大作中提到】
: 那个是这样的 如果个passcode不用前面的 也就是upper bound = 40k 如果每次都用前
: 面三个 就是 10k + 3
: 代码的话 用1000个bucket记录生成了的 然后每次找没生成的 就行
: 最后证明了一下 10k + 3的能生成

avatar
c*m
14
那个fuzzy words是啥意思啊? 能说清楚点不?
avatar
y*c
15

If we start from 0000 and use minimum digits if the number doesn't appear
previously, we get 0000100020003000400050006000700080009 and it will form a
cycle and stop generating new numbers.
How to show 10k+3 is feasible?

【在 l*****c 的大作中提到】
: 那个是这样的 如果个passcode不用前面的 也就是upper bound = 40k 如果每次都用前
: 面三个 就是 10k + 3
: 代码的话 用1000个bucket记录生成了的 然后每次找没生成的 就行
: 最后证明了一下 10k + 3的能生成

avatar
l*c
16
不保证 可以试试写一个program生成一下。

a

【在 y*c 的大作中提到】
:
: If we start from 0000 and use minimum digits if the number doesn't appear
: previously, we get 0000100020003000400050006000700080009 and it will form a
: cycle and stop generating new numbers.
: How to show 10k+3 is feasible?

avatar
d*3
17
UTF-8 validation 也被问过,请问如何解呢?
avatar
r*n
18
["APE", "APPLE", "ACE"] -> "ACE"
这到题实际上是让你算empirical frequency,然后用这个生成的pdf做random
sampling
比如A字母后面出现过P和C两个字母,但是出现AP的次数是AC的两倍,所以pmf就是[1/3
,2/3],对应的是[C, P]
当你把所有字母的transfer pmf求出来之后,一个字母一个字母的取样,最后就求出来
所谓的fuzzy words了。

【在 c*********m 的大作中提到】
: 那个fuzzy words是啥意思啊? 能说清楚点不?
avatar
j*t
19
>1.2 How many 0s tailing in N!
这题是数1...N中末尾数是5或0的个数吗?
>2.1 10 buttons passcode with 4 digitals. Generate a sequence to
> brute force it. Upper bound and lower bound of length, code to
> generate an optimal one.
>
>If we start from 0000 and use minimum digits if the number doesn't >appear
previously, we get 0000100020003000400050006000700080009 and >it will form a
cycle and stop generating new numbers.
backtracking? 如何证明soultion接近10k+3?
avatar
n*e
20
多谢楼主分享。
好公司很多,楼主加油!
avatar
p*3
21
这题好象无解
包含所有排列的最短字符串
difficult even to verify a given string is "optimal"

【在 l*****c 的大作中提到】
: 密码由 0-9组成 有四位 场景是你在上面连续按键 比如按得"12345"
: 就先用"1234"去匹配密码 然后"2345" 如果密码对了 门就开了
: 需要生成一个序列 一定能打开这个门

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