547 Friend Circles
547. Friend Circles
1. Question
Input:
[[1,1,0],
[1,1,0],
[0,0,1]]
Output: 2
Explanation:
The 0th and 1st students are direct friends, so they are in a friend circle.
The 2nd student himself is in a friend circle. So return 2.2. Implementation
3. Time & Space Complexity
Last updated