Uber | Phone Screening Question

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2019-10-22Added By Anonymous
Source: Link

Company: Uber

Interview Stage: Phone Screen


Original Post Content:

Given a time interval list which represents trips, find overlapping trip counts for each time interval and return as a list.


Example:

Input: [(0, 3), (2, 7), (2, 5)]

Output: [(0, 1, 1), (2, 3, 3), (4, 5, 2), (6, 7, 1)]

Comments