Given a network of cities and connected roads, find the size of the largest connected group of cities (with custom constraints).
Asked in the Round 2: DSA stage. Focus on DSU Data Structure & Connected Components.
Implement largest_connected_group(n, roads), where cities are labeled 0 through n - 1 and each road is a pair [u, v]. Return the number of cities in the largest connected component. Roads may be duplicated or connect a city to itself.
def largest_connected_group(n, roads):