Company: Ion Group_15july
Difficulty: medium
Longest Single Slot Problem Description A hospital has 26 nurses with employee numbers 0 through 25 . Employee number k has the ID given by the k -th lowercase letter, so 0 is 'a' , 1 is 'b' , ..., 25 is 'z' . The work day starts at time 0 . Exactly one nurse works at a time, and each nurse starts the moment the previous nurse leaves. The shifts are recorded in a 2D integer array leaveTimes , where each row [employee number, leave time] describes one shift: that employee worked from the moment the previous shift ended until leave time . The rows are given in increasing order of leave time. So the first shift runs from time 0 to leaveTimes[0][1] , and shift i (for i >= 1 ) runs from leaveTimes[i-1][1] to leaveTimes[i][1] . The length of a shift is its end time minus its start time. Determine the ID of the nurse who worked the longest single shift . Each row is its own shift. If the same employee appears in two or more rows, even back to back, those are separate shifts and their lengt