Implement a data structure to process student friend queries. Given $n$ queries, support two operations: union the friend groups of two students, and find the total number of students in a student's…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.