ben
BAN USER
Comments (2)
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
Why going backward at all?
The question that should have been asked was how is the probability of finding that object distributed across that infinite line.
All the algorithms described in this thread assume that the object is more likely to be found closer from our initial position, and so everybody feels the need to come back and check the other side.
If the probability is equality distributed across the line, then you just keep going forward forever.
If the object is more likely to be closer from our initial position, then we need to know the probability distribution in order to know how many steps to take before it's worth coming back and checking the other side.
Any algorithm without that information is just pure guess.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
- ben September 24, 2013