Company: Agoda_27july
Difficulty: medium
Longest Uninterrupted Process Run Problem Description A single-core scheduler executes exactly one of 26 registered jobs at a time, the jobs identified by IDs 0 through 25 corresponding to the letters 'a' through 'z'. The scheduler begins at time 0, and as soon as one job finishes, the next one starts immediately with no gap between them. You receive a log of these executions, where each entry is processNumber/endTime and records that the job with that ID finished at endTime. Write a function that reports which job had the single longest uninterrupted stretch of execution. If the same job appears again later after other jobs have run, that later stretch is counted separately from its earlier one. 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 E