Compute concurrent online drivers
RipplingSoftware Engineer · Technical ScreenLast updated
This question evaluates proficiency in algorithms and temporal data handling, including the use of efficient search techniques and complexity reasoning to count distinct active drivers over a sliding 24-hour window.
Question
Given each driver’s chronologically sorted delivery records, build an algorithm that, for a timestamp t, returns how many distinct drivers were online at any moment in the previous 24 hours. Optimize using per-driver binary search and justify the complexity.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.