avatar
问一道FB design之后续# JobHunting - 待字闺中
n*y
1
原帖在这里: http://www.mitbbs.com/article_t1/JobHunting/33285661_0_1.html
今天跟FB专门做privacy setting一美国大牛又聊到了这个问题,跟他讲了之前大家讨
论的“post to friends' timeline”的想法。他的回复是:
This can be done simpler, without any extra writes.
A hint: You are thinking about the problem as "How to check if C is a friend
of friends of A". But it is possible to rephrase the question in an other
way which will make the problem much simpler to solve.
大家怎么看?
PS: 再把题目贴一下
privacy setting. 说是每个user有一个friend
list, user可以发Post, 问如何设计Ouser friends的friends可见,时间复杂度O(N)
avatar
x*y
2
some sort of variation of TTL, originally 2, decrease by 1 in each step? But
it may need to dedup in some cases
avatar
n*y
3
这个大牛只给了我思路,他和我的面试官是一个组的,我一问他就知道这个问题,大概
是他们私下讨论过的。所以他的hint应该是没有问题的。大家对这个思路有什么想法没
有?
avatar
r*v
4
check intersection of F(a) and F(c)?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。