1) There is a road on which a car starts with an integral speed towards the left or the right, starting from an integral point (take the road to be the x-axis)

2) The speed and the point from which it starts is not known.

3) The car starts moving at t=0.

4) I am standing on the side of the road on a mountain and I will start shooting bullets at t=1s, and have the ability to do so every 1s.

I need to determine an algorithm which can hit the car. Assume that the bullet has infinite speed and if you point the gun correctly, the bullet will hit the car as soon as it is shot.

  • $\begingroup$ Is this your question? Also, does the car have some length? $\endgroup$ – boboquack Sep 26 '19 at 4:11
  • $\begingroup$ car has 0 length, to hit it you need to hit at the position of the car $\endgroup$ – Aman Sep 26 '19 at 4:17
  • $\begingroup$ You need to flush out this question more. I suspect an answer like "while(car not hit) ShootGunTowardsCar()" is not what you're looking for. $\endgroup$ – MooseBoys Sep 26 '19 at 6:52

Browse other questions tagged or ask your own question.