Sort a list of employee dicts (name, dept, salary, start as "YYYY-MM-DD") in several ways. Don't modify the input.
by_dept_then_salary(rows): department A→Z, then salary highest first, then name A→Z.by_seniority(rows): earliest start date first, ties by name.top_earner_per_dept(rows): a dict mapping each department to the name of its highest earner (ties: the earlier start date, then name).Python's sort is stable, and you can negate numeric keys to sort them descending within one key tuple.