Company: Ion Group_15july
Difficulty: medium
Longest Single Slot Problem Description Analyze the work shifts of 26 nurses with employee numbers 0 to 25, corresponding to IDs 'a' through 'z'. Shifts start at time 0. One nurse works at a time. The next nurse begins immediately when the previous one finishes. Given a 2D array, leaveTimes , where each element is [employee number, leave time] . Determine the ID of the nurse who has the longest single shift. Note: Consecutive shifts by the same employee are considered separate. Complete the function findLongestSingleSlot which accepts a 2D integer array, leaveTimes , as a parameter. Each inner array [employee number, leave time] represents an employee's shift ending time. The function should return the character ID of the nurse with the longest single shift. Examples Example 1: Input: leaveTimes = [[0, 3], [2, 5], [0, 9], [1, 15]] Output: b Explanation: The shifts are as follows: Employee 0 works from t = 0 to t = 3, i.e., for 3 units. Employee 2 works from t = 3 to t = 5, i.e., for 2