PhonePe interview question

Problem Solving - Uber Driver Puzzle