You are given a ride-hailing scenario interview question:
A passenger requests a ride from somewhere in a city. The driver is currently at a known GPS location. How should the system help the driver "pick up" the passenger and recommend an appropriate pickup point (e.g., safest/closest roadside spot) for the passenger to walk to and the driver to reach?
Describe how you would design the algorithm and high-level system for:
-
Determining a good pickup location given the passenger's approximate location (e.g., GPS pin inside a building or near a large intersection), the road network, and real-time conditions.
-
Presenting that pickup point to both the passenger and the driver in the app.
Include your assumptions, the main data you need (maps, traffic, etc.), how you would generate candidate pickup points, what objective(s) you would optimize (e.g., total time, walking distance, safety), and how this fits into a production system architecture.