Find the Maximum Number of Concurrent Processes
Company: Amazon
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: hard
Interview Round: Onsite
Quick Answer: Practice a Amazon coding interview problem focused on find the maximum number of concurrent processes. The prompt emphasizes edge cases, clean implementation, and verifiable test behavior without revealing the solution.
Examples
Input: {"intervals":[[1,3],[2,5],[3,6]]}
Expected Output: 3
Explanation: All active at time 3.
Input: {"intervals":[]}
Expected Output: 0
Explanation: No intervals.
Input: {"intervals":[[1,1]]}
Expected Output: 1
Explanation: Point interval.
Input: {"intervals":[[1,2],[3,4]]}
Expected Output: 1
Explanation: No overlap.
Input: {"intervals":[[1,2],[2,3]]}
Expected Output: 2
Explanation: Inclusive endpoint.
Input: {"intervals":[[-2,1],[-1,2],[0,3]]}
Expected Output: 3
Explanation: Negative times.
Input: {"intervals":[[5,10],[1,100],[20,30]]}
Expected Output: 2
Explanation: Long interval overlaps both.
Input: {"intervals":[[1,5],[1,5],[1,5]]}
Expected Output: 3
Explanation: Duplicates.