looks like bfs?
So cool. Thank you @StefanPochmann
@awice can you explain the dfs part? what is node?
@alexander i think it is similar to isolated island problem
we can change
for (int k=0;k<M.length;k++)
for (int k=student;k<M.length;k++)
no need to start from 0, can start from 'student'.
No one has replied
Because this problem uses adjacency matrix as the graph representation as opposed to our familiar adjacency list representation.
@hollyhigh exactly! I was like, is it a medium hard?!!!#$35454645
@theD I have the exact question. Based on the problem definition and other test cases, this should return 4. Does anybody has answer to this question? Is there anything we are missing?
Disabled Categories are greyed out
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.