Leetcode, Interval, Interview Questions, Google, Meta.
each start event, if current counter before it was 1, it means there is only one process currently ongoing, increment the processing time of the ongoing process (process associated with the last event). Associate the process id with each event so it is easy to track the current process. Similarly