我在重叠问题上进行了检查。这可能是关闭的:find number of tennis matches required查找锦标赛比赛列表中的优胜者
这是亚马逊的面试问题。我想知道对于'p'玩家来说,关键路径上的Θ(log p)操作是否是正确答案(与锦标赛屏障算法 - > John Mellor-Crummey相同)。
比方说,我们有4名玩家1,2,3,4,我们可以安排之间的匹配:
1) Between (1 & 2)
2) Between (3 & 4)
3) organize the third match between winners of these two matches.
类似地,对于图5(奇数)播放器,我们可以安排之间的匹配:
1) (1 & 2) and (3 & 4)
2) Winner from (1&2) OR winner from (3&4) against 5
3) Winner between winner of not chosen group and winner from previous match
。
所以问题是“如果每场比赛都有两名对手参加比赛,那么用p'赢得一场比赛的最少比赛数是多少?这个数字是多少?log(p)'?”。这是个问题吗? – angelatlarge 2013-03-16 17:57:02
我们不知道问题是什么。投票结束。 – 2013-03-16 18:02:52
我从glassdoor.com得到它,我希望我也知道完整的问题。 – user1071840 2013-03-16 18:04:59