You are given employees, a list of dictionaries. Each dictionary has the keys 'id' (int), 'name' (str), 'dept' (str) and 'salary' (int).
Return a dictionary that maps each department name to the id of the highest-paid employee in that department.
If two or more employees in the same department share the highest salary, choose the one with the smallest id.
If employees is empty, return an empty dictionary.
NOTE: This is a function-type question — you only write the function. Do not read input or print anything; a hidden checker calls your function and checks its return value.
Arguments
[{'id': 1, 'name': 'A', 'dept': 'Eng', 'salary': 100}, {'id': 2, 'name': 'B', 'dept': 'Eng', 'salary': 120}, {'id': 3, 'name': 'C', 'dept': 'HR', 'salary': 90}]
Returns
{'Eng': 2, 'HR': 3}