There are n employees, each assigned a unique identifier from n
You are given a logs where each element logs[i] = [id, leaveTime] indicates that the employee with identifier idleaveTime
The leaveTime
Return the identifier of the employee who worked on the task with the longest duration. If there is a tie, return the smallest employee identifier among them.
Constraints:
n
logs.length
logs[i].length
idn
leaveTime
idid
leaveTime
There are n employees, each assigned a unique identifier from n
You are given a logs where each element logs[i] = [id, leaveTime] indicates that the employee with identifier idleaveTime
The leaveTime
Return the identifier of the employee who worked on the task with the longest duration. If there is a tie, return the smallest employee identifier among them.
Constraints:
n
logs.length
logs[i].length
idn
leaveTime
idid
leaveTime