Round 1
Questions:
You're given a list of elements. Each element has a unique id and 3 properties. Two elements are considered as duplicates if they share any of the 3 properties. Please write a function that takes the input and returns all the duplicates. Example Input: E1: id1, p1, p2, p3 E2: id2, p1, p4, p5 E3: id3, p6, p7, p8 Example Output: {{id1, id2}, {id3}}
This Question is very similar to LC 721.
Candidate's Approach
Solved it using Union Find Data Structure. The approach involved grouping elements based on shared properties and then identifying duplicates.
Interviewer's Feedback
Interviewer was satisfied with the solution.