注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
刚面的L5,趁着还记得赶紧上面经,还热乎的
1. Coding 华人大哥,上来二话不说直接做题,很好很直接,帮我省时间了
Given a stream of prices from transactions: 79.20, 20.05, 96.82, ...
Implement 2 methods:
1) insert(price)
2) query(percentile) - e.g.: query(0.2) should give a price that 20% of prices is lower than it, 80% of prices should be higher than it
演了一下,讲了一下insertion sort还有BST的解法,大哥开始提示了,心领神会上segment tree然后卡着点写完。
2. Coding 印度大哥,也是上来直接做题
N cities from 1 to N, each city has either landmark A or B
return true if there is a path from x to y so that path has either A or B landmark, otherwise return false
example:
Landmarks: 1:A,2:B,3:B,4:A,5:A
Paths:
1-2
1-5
3-4
3-5
4-5
from 1 to 4 -> 1,5,4 (x) but 1,5,3,4 (y) so return true
差不多就是DFS把可能的path都找一遍,写完和面试官dry run一下,修了俩小bug然后到时间
3. Design 毛子口音的大哥,不确定哪里人,不敢问
Design a key-value store
50 billion key-value pairs
1000 QPS
No writes
key: string - 20 bytes
value: string - 1您好! 本帖隐藏的内容需要积分高于 188 才可浏览 您当前积分为 0。 使用VIP即刻解锁阅读权限或查看其他获取积分的方式 游客,您好! 本帖隐藏的内容需要积分高于 188 才可浏览 您当前积分为 0。 VIP即刻解锁阅读权限 或 查看其他获取积分的方式 D message过来,后来发现要“尽快”,也就是在time=5的时候要能determine RPC2 timeout。修修改改最后用PriorityQueue去存endTime。
题都跌跌爬爬做出来了,design自觉也还行,希望能有好结果吧。
补充内容 (2022-03-08 11:41 +8:00):
额,晚上recruiter来邮件说可以move forward了,是送HC的意思吗?现在狗家都这么快了吗? |