Coding Challenge · BEGINNER
Given an undirected graph represented by an integer n (number of nodes) and an array edges where each element is a pair u, v indicating an edge between nodes u and v, determine the number of connected components in the graph. A connected component is a set of nodes such that there is a path between any two nodes in thi…