Microsoft Tech Screen | SDE 2 | USA
Anonymous User
2267

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:

Input: YYYY/MM/DD HH:MM:SS
List<start_time, end_time> connections
Input: [[1, 3], [1, 7], [2, 3]]
Answer: 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 (9)