由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - google, vmware 面经
相关主题
FLG面经+++++提供Facebook内推!!!超大young矩阵查找
M家一道题请问以下程序运行结果
thread-safe blockingqueue为什么板上这么多人还是抱着C++不学Java呢?
SRE职位要不要刷题给用C++面试的同胞提个醒
failed bloomberg phone interview两年工作经验,只用过C,在学C++,跳槽求破
[google面试]iterator访问现在是不是C++不怎么值钱?
新店面Splunk面经 (转载)
问一道crack tech interview里面的题大牛推荐计算机面试的书吧
相关话题的讨论汇总
话题: machine话题: cache话题: linkedlist话题: implement话题: thread
进入JobHunting版参与讨论
1 (共1页)
a********9
发帖数: 129
1
google面的是SRE
电面是国人大哥,一些c语言的pointer问题,然后一道leetcode原题
onsite1:
1)combination,还是没dupliate的,要把结果保存起来,我说用linked list,因为是
用c写,还要自己implement linkedlist, 略坑爹
2) 就是很简单的统计两个string分别有多少个单独的letter
onsite2:
bst inorder iterator
onsite3:
一个文件,每行是rack_name + machine id,输出每个rack有多少个machine,按大小排
序,我是先扫一遍存hashtable,再存进linkedlist再sort,这回没让我实现hashtable
跟linkedlist了,不过要我把用过的api单独再declear一下,最后再写个mergesort
onsite4:
有很多个machine,要求检测哪些die了,要求parallel,就写了一个for loop创建若干
个thread来执行任务,有点thread pool的感觉,用一个array来表示哪个machine被检测
了与否,最后再写个检测的函数,要求socket programming,我就用tcp connect了一下
,里面的各种api(pthread_thread, connect)我都不记得了,随便写写意思意思
onsite5,system design
1) 电话号码查询,其实就是hashtable,先一个machine再scale,consistent hash跟
redundancy
2)如何提高disk 数据访问的latency,我给的答案有 1,cache, 2 seqencial visit 3
, redundancy disks一起访问,用最快返回的数据
3)连不上server了怎么trouble shooting,这题坑太大了,就随便答答
HR的反馈是我虽然代码写的快但考虑的不够仔细,我估计是第四轮吧,呵呵
vmware面的是 core storage
电面1:
前面问了些scheduler,mutex,tcp windows的问题,code题有3个
1) memcopy,最简单的,不用考虑overlap
2) 如何判断stack是往上还是往下增长,答案是call一个子函数,返回子函数的local
variable的address,然后跟母函数的local variable address比较
3) bubble sort
电面2:
描述syscall怎么实现,argument存哪,在kernel里面怎么访问user land的地址
device怎么与os communicate
coding 题
1)把{0,1,0,1,1}变成{0,0,1,1,1},这叫partition还是叫啥,好像leetcode有
2)Flatten Binary Tree to Linked List
onsite1:
how to implement/walk through the process of syscall, signal, read a mounted
file等等
onsite2:
1)
detect loop in linked list
give an array contain number from 1-10000, but just one num is missing, find
the number
answer: add the sum
2)
c struct padding/size, which the flag in compiler for optimization padding?
fpack-struct
3)
detect loop in linkedlist
onsite3:
1)
implement barrier by mutex and semaphore(wake up one by one)
我大概是这么写的;
mutex.lock();
count++;
if (count == N) {
mutex.unlock();
} else {
mutex.unlock();
semaphore.wait()
}
semaphore.signal();
2)
implement cognitional variable by semaphore and mutex,我不记得我怎么写了
onsite4:
写个malloc/free/calloc。。。
how to sync caches in two machines, cache size is limited, said, machineA
want to write to cache, but maybe machineB don’t have enough cache. answer:
need to flush cache in machineB(大概是这么个意思,没时间了,没仔细问)
onsite5:
spin lock fair solution? answer: use bitset to represent which thread
already held the lock before
sync with two machine’s disk?
answer: write ahead log first, if another machine also succeeded write to
log then write data to itself disks and clear log
p*********s
发帖数: 13
2
thanks for sharing
s**x
发帖数: 7506
3
如何判断stack是往上还是往下增长
just declare 2 local variables and check the address should be enough.
int a;
int b;
&a < &b
a********9
发帖数: 129
4
面试官说compiler可能会优化

【在 s**x 的大作中提到】
: 如何判断stack是往上还是往下增长
: just declare 2 local variables and check the address should be enough.
: int a;
: int b;
: &a < &b

c********e
发帖数: 186
5
thanks for sharing
s**x
发帖数: 7506
6
that is a good point, but it could be disabled as well.

【在 a********9 的大作中提到】
: 面试官说compiler可能会优化
f********e
发帖数: 91
7
bless!LZ是系统方面的背景吗?很多系统的题呀。

【在 a********9 的大作中提到】
: google面的是SRE
: 电面是国人大哥,一些c语言的pointer问题,然后一道leetcode原题
: onsite1:
: 1)combination,还是没dupliate的,要把结果保存起来,我说用linked list,因为是
: 用c写,还要自己implement linkedlist, 略坑爹
: 2) 就是很简单的统计两个string分别有多少个单独的letter
: onsite2:
: bst inorder iterator
: onsite3:
: 一个文件,每行是rack_name + machine id,输出每个rack有多少个machine,按大小排

a********9
发帖数: 129
8
os背景的,没办法

【在 f********e 的大作中提到】
: bless!LZ是系统方面的背景吗?很多系统的题呀。
c********p
发帖数: 1969
9
mark
s******8
发帖数: 158
10
thanks for sharing
d****n
发帖数: 1241
11
C99 6.5.8.5
“&a < &b”这样的比较是undefined behavior

【在 s**x 的大作中提到】
: 如何判断stack是往上还是往下增长
: just declare 2 local variables and check the address should be enough.
: int a;
: int b;
: &a < &b

d****n
发帖数: 1241
12
在这里编译器可以做任意的事情

【在 a********9 的大作中提到】
: 面试官说compiler可能会优化
1 (共1页)
进入JobHunting版参与讨论
相关主题
大牛推荐计算机面试的书吧failed bloomberg phone interview
Spotify很理直气壮的用Java...[google面试]iterator访问
C++定义数组长度可以写成int a[n]吗?新店面
教你进Google [1]问一道crack tech interview里面的题
FLG面经+++++提供Facebook内推!!!超大young矩阵查找
M家一道题请问以下程序运行结果
thread-safe blockingqueue为什么板上这么多人还是抱着C++不学Java呢?
SRE职位要不要刷题给用C++面试的同胞提个醒
相关话题的讨论汇总
话题: machine话题: cache话题: linkedlist话题: implement话题: thread