avatar
G新鲜system design题目# JobHunting - 待字闺中
n*a
1
板上好像没人发过, 大家讨论一下:
Design a system to hand out telephone numbers for Google voice.
You want to present numbers to people such that:
a person sees 10 numbers at a time
no two people should see the same numbers at the same time
they get 2 minutes to choose one of those numbers or ask for more. If they
choose one after the 2 minutes are expired, the request fails.
Where you would put the various data elements - in a database, application
servers, front-ends or the browser.
What kinds of data structures you would use.
avatar
g*g
2
一个RDBMS就搞定了,显示10个号码的时候打上用户名和时间戳,对电话号码索引。

【在 n***a 的大作中提到】
: 板上好像没人发过, 大家讨论一下:
: Design a system to hand out telephone numbers for Google voice.
: You want to present numbers to people such that:
: a person sees 10 numbers at a time
: no two people should see the same numbers at the same time
: they get 2 minutes to choose one of those numbers or ask for more. If they
: choose one after the 2 minutes are expired, the request fails.
: Where you would put the various data elements - in a database, application
: servers, front-ends or the browser.
: What kinds of data structures you would use.

avatar
g*o
3
如何找到the next 10 available numbers
avatar
l*s
4
我很笨,看了半天没明白题意,求教讲解?
avatar
u*n
5
用lock不可以吗,require的时候好比是 write,拿到lock后才能对这些号码操作,2分
钟后失效,remove lock,后面的人就能看到了。
avatar
n*s
6
10个号码没说清楚,估计是都不能重复,这题挺简单的,不过可以引出来比较有趣的话题

【在 l******s 的大作中提到】
: 我很笨,看了半天没明白题意,求教讲解?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。