You are facing a high wall that stretches infinitely in bothdirections. There is
ID: 3608687 • Letter: Y
Question
You are facing a high wall that stretches infinitely in bothdirections. There is a door on the wall at a finite distance butyou do not know how far away and in which direction. It is pitchdark, but you have a very dim lighted candle that will enable youto see the door when you are right next to it.*Devise and algorithm that enables you to find the door. *Assume n is the number of steps that you would have taken ifyou knew where the door is and walked directly to it. Calculate theexact number of steps you walk if you follow your algorithm as afunction of n. Try to find the best algorithm (requires smallest number of steps.)
*Devise and algorithm that enables you to find the door. *Assume n is the number of steps that you would have taken ifyou knew where the door is and walked directly to it. Calculate theexact number of steps you walk if you follow your algorithm as afunction of n.