DrawCode Practice Problem

Department Top Earner

From `Employee(id, name, salary, departmentId)` and `Department(id, name)`, find employees who earn the maximum salary in each department.

Examples

Input

multiple employees per department

Output

department name + employee name for max salary

Constraints


Interactive Visualizer Workspace

Explore step-by-step interactive animations, memory state tracking, and live multi-language execution in DrawCode.

Launch Interactive Visualizer