Adjacency matrix of an undirected graph is given. Return the number of connected components in the graph.
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers82
Suggested Problems
-
Make a run-length companion vector
662 Solvers
-
Replace multiples of 5 with NaN
472 Solvers
-
248 Solvers
-
757 Solvers
-
Sort the vector with the given index
128 Solvers
More from this Author44
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Test case 2 matrix is not symmetrical. Can't be the adjacency matrix of an undirected graph.
yes.. fixed it