Company: Boeing Swe on campus_16march
Difficulty: medium
Debugging - Count Network Component Groups You have a buggy implementation for the following problem in the countConnectedComponents function. The current solution does not work correctly because there are errors in the code. Your job is to identify and correct all errors to make it pass all test cases Statement You have an undirected network with N points and M links. Your job is to find the number of separate groups in the network. A separate group is a part of the network where you can travel between every pair of points within that group. Function Description You need to implement the function countConnectedComponents . The function should take the number of points N and a list of links and return the number of separate groups in the network. Parameters: N: An integer showing the number of points in the network. M: An integer showing the number of links. edges: A list of M pairs, where each pair (u, v) shows a link between point u and point v . The network is undirected. Return: An