Uber | Phone | Sticks & Maximum number of overlapping Intervals
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2020-03-09Added By Anonymous
Source: Link
Company: Uber
Role: unknown
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
Q1: Given array of stick lengths, return number of turns it takes to have no sticks left. Each turn you remove sticks of smallest length and cut that length from the rest of the sticks.
Q2: In a 2D vector, all vectors were of size two. Eg: {{1,3},{2,3},{1,4}}. The vectors represent the entry and exit time of a pedestrian crossing a road. Pedestrian 1 entered at time 1 and exited at time 3 and so on.. Find the interval during which maximum number of pedestrians were crossing the road.
If you've seen this question before in leetcode, please feel free to reply.