1/43
Loading...
👥SNS Friend Analysis!
Let's find how many friend groups exist among 7 users!
🔒
Loading...
Let's find how many friend groups exist among 7 users!
User friendships are given for a new SNS service. Users who are directly friends or connected through friends belong to the same group. Find the total number of friend groups.
7 [[1,1,0,0,0,0,0], [1,1,1,0,0,0,0], [0,1,1,0,0,0,0], [0,0,0,1,1,0,0], [0,0,0,1,1,0,0], [0,0,0,0,0,1,1], [0,0,0,0,0,1,1]]
3
Group1: {Minsu, Jiyoung, Sujin}, Group2: {Hyunwoo, Seoyeon}, Group3: {Junho, Yeeun} → 3 groups