Given N employees, each with an integer id and a set of interests (strings), write an algorithm to find all employees who share at least one common interest. Return either (a) a mapping from each interest to the sorted list of employee ids who have it, and/or (b) the list of all unique employee-id pairs (u, v) that share one or more interests. Analyze time and space complexity and provide code in your preferred language.