Henrywang0113
BAN USER
Comments (4)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
That is a classic problem. If A knows B, we can eliminate A, otherwise we can eliminate B. We can eliminate one person after each time we call knows(i, j), so it will take O(n) to find the celebrity.
- Henrywang0113 January 16, 2015Comment hidden because of low score. Click to expand.
0
of 0 vote
what will it be used for?
- Henrywang0113 January 16, 2015Comment hidden because of low score. Click to expand.
0
of 0 vote
if A is:
0
1 2
3 4
B is:
1
3
will that be considered A is a subtree of B?
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Can you give it a detailed explanation?
- Henrywang0113 January 17, 2015