Interview slot schedules

Write codeEasy18 min

Your task

A hiring panel books one interviewer per slot for a single loop. There are as many slots as interviewers, numbered from 0 upward, and available_slots[i] lists the slot numbers that interviewer i can take. Every interviewer runs exactly one slot and every slot gets exactly one interviewer. Return each complete schedule as a string: the interviewer covering slot 0, then the one covering slot 1, and so on, joined by a comma and a space. Return the schedules sorted in ascending order, so the result does not depend on the order the roster was typed in. Interviewer names are distinct, an availability list may repeat a slot number, and an empty panel returns an empty list. There are at most 6 interviewers.

Examples

list_panel_schedules(interviewer_names: list[str], available_slots: list[list[int]]) -> list[str]
Example 1
Inputlist_panel_schedules(["Ada", "Bo"], [[0, 1], [0, 1]])
Output["Ada, Bo", "Bo, Ada"]
Example 2
Inputlist_panel_schedules(["Ada", "Bo", "Cy"], [[0], [1, 2], [2]])
Output["Ada, Bo, Cy"]
Example 3
Inputlist_panel_schedules(["Zed", "Ada"], [[0, 1], [0, 1]])
Output["Ada, Zed", "Zed, Ada"]