Company: JPMC_8_jan
Difficulty: medium
Minimum CPU Cores Problem Description A CPU can run one process per core at any given time, but it may have multiple cores. You are given n processes, where each process i : Starts at time start[i] Ends at time end[i] Both start and end times are inclusive. Two processes overlap if they need a core at the same time. Your task is to determine the minimum number of CPU cores required so that all processes can run without conflict. Return this minimum number of cores. Example Suppose there are n = 3 processes with times start = [1, 3, 4] and end = [3, 5, 6] . Output: 2 Explanation: If the CPU has only one core, the first process starts at 1 and ends at 3. The second process starts at 3. Since both processes need a processor at time 3, they overlap. There must be more than 1 core. If the CPU has two cores, the first process runs on the first core from 1 to 3, the second runs on the second core from 3 to 5, and the third process runs on the first core from 4 to 6. This arrangement works wit