You are facing a wall that stretches infinitely in both directions. there is a door in the wall, but you know neither how far away nor in which direction. you can see the door only when you are right next to it. design an algorithm that enables you to reach the door by walking at most o(n) steps where n is the (unknown to you) number of steps between your initial position and the door.
Answers
Answered by
0
Can't do such lenghty questions sorry
Similar questions