Make sure that you can request the list of pairs in problem 1) multiple times without ever getting duplicate pairs
Asked in the first round, CoderPad stage. Part 2 builds on part 1: each call receives employee availability and previously returned pairs. If Robert is matched with Susy, Susy must not also be matched with someone else in the same call.
Implement next_pair_list(availability, used_pairs). availability is a dictionary mapping employee names to possible partners. Return a maximum-size list of unique, unordered pairs that does not contain any pair in used_pairs. Each employee may appear at most once in the returned list. Return [] when no unused pair is available. Break equal-size solutions lexicographically.
Use employee names as strings. Return pairs as two-element lists, sorted within each pair and ordered lexicographically.
def next_pair_list(availability, used_pairs):