Given a log file which records the start and end timestamp of each task processed by a server, in the format:
<Start time> <End time>
What is the maximum number of concurrent running tasks?
Example:
09:00:00 - 06/01/2022 10:40:10 - 06/01/2022
09:20:00 - 06/01/2022 09:40:10 - 06/01/2022
08:00:00 - 06/01/2022 11:40:10 - 06/01/2022
Question: What is the maximum number of concurrent running tasks?
This is a classic interval overlap problem. Each task contributes a start event and an end event, and the goal is to find the maximum number of tasks active at the same time. A standard solution is to sort all time events and sweep through them while maintaining the current number of running tasks and the maximum seen so far. If start and end times can be equal, the tie-breaking rule should be handled carefully when sorting events.