# Question: must every pair of students in the same group be direct/indirect friends?

• For instance:

``````{{1,1,0,0},
{1,1,1,0},
{0,1,1,1},
{0,0,1,1}}
``````

0<->1<->2<->3
Where 0 and 3 are neither direct nor indirect friends, are there 1 or 2 cycles?
Don't think the description explains this well.

• {{1,1,0,0},
{1,1,1,0},
{0,1,1,1},
{0,0,1,1}}

Put it through the Custom Testcase and expected answer is `1`. This would explain something as supplement

• I had the same confusion. I was thinking that (0,1,2) is a cycle and (1,2,3) is another cycle. Then I found it is too hard for a Medium Problem, so I did the same thing with @Phillf. It seems as long as 2 students are connected some how they are in the same cycle. The description is truly not clear, hope it can be fixed.

• @hollyhigh yea that right. actually the question can be just described as "find the number of connected graph". Specifically, we should define that "two persons are in the same friend circle if they have mutual direct or indirect friend"

• @hollyhigh exactly! I was like, is it a medium hard?!!!#\$35454645

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.