Microsoft Tech Screen | SDE 2 | USA

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2022-01-18Added By Anonymous
Source: Link

Given a List of events with start_time and end_time. of connections Find the hour in which we have most number of active connections.

Example:

1Input: YYYY/MM/DD HH:MM:SS 2List<start_time, end_time> connections 3Input: [[1, 3], [1, 7], [2, 3]] 4Answer: 2 (Hour 2 has most active connections)

Follow up:


•Suppose the list is huge and is distributed accross mutliple machine. How would you process it?

PS. I am more interested in knowing solution/approaches for the follow-up.


Thank you

Comments