Shopee interview question

Given a long lists of events , each event with corresponding start and end time . Find the time period when there are most number of events overlapping each other.

For example list (start_time , end_time):
(5,8)
(1,5)
(4,5)
(2,6)

in time period 4 to 5 , there are most numer (3) events overlapping each other.

can someone help do with this in java?

Comments (6)