Company: Agoda_27july
Difficulty: medium
Longest Uninterrupted Process Run Problem Description You are analyzing CPU usage logs in a system where only one process runs at a time. There are 26 scheduled processes with IDs from 0 to 25, corresponding to characters 'a' through 'z'. The system starts running at time 0. Only one process runs at a time, with the next beginning execution immediately after the previous one ends. Given the list of logs, where each entry is processNumber/endTime representing that the process with that ID ended at endTime. Represent a function that determines which process had the longest single uninterrupted run. Consecutive runs of the same process are treated as separate. The function findLongestRun will take the following input: runLogs : a 2D array of size n containing pairs of (processNumber, endTime) The function should return the character ID of the process with the longest single run. char findLongestRun(vector<vector<int>> runLogs) Examples Example 1: Input: runLogs = [[0, 3], [2,