Uber 面试经验【一亩三分地论坛面经版】 - Powered by Discuz!
Uber店面. 问了什么是RPC, 怎么实现的. Linux的file system的结构, 最后让我自己设计一个结构可以存很大的file. 接下来是算法题: 有一个很长的list<pair<int, int> > 第一个int 的这个node的序号,第二个int 是这个node 的weight。 写一个函数返回node的序号, 比如:.鏈枃鍘熷垱鑷�1point3acres璁哄潧 (2, 3)->(3, 5)->(1, 7). 那么返回2的概率是(3/15), 3的概率是:(5/15),1 的概率 . 1point3acres.com/bbs 补充内容 (2015-9-4 13:12): 算法题,我后来琢磨了一下: Basically divide the input list into two parts. weight = (weithtUntilNow + thisNode.weight), so generate a random number, randWeight = [1, weight]. if this randWeight > |
Read full article from Uber 面试经验【一亩三分地论坛面经版】 - Powered by Discuz!
No comments:
Post a Comment