How would you test a high availability zone?
Model zones as vertices and connections as undirected edges. Implement critical_zones(n, connections) to return the sorted indices of zones whose removal increases the number of connected components in their original component.
Examples
n = 5, connections = [[0,1],[1,2],[2,3],[3,4]] returns [1,2,3].n = 4, connections = [[0,1],[1,2],[2,3],[3,0]] returns [].Constraints
1 <= n <= 100000def critical_zones(n, connections):