Question
A network of n servers (labeled 0..n-1) is connected by undirected connections, where connections[i] = [a, b] is a bidirectional link. A connection is 'critical' if removing it disconnects some server from the rest of the network (a bridge). Return all critical connections, each as a pair [a, b]. Order of the returned pairs does not matter, and each pair may be in either order.
critical_connections(n: int, connections: list[list[int]]) → list[list[int]][4,[[0,1],[1,2],[2,0],[1,3]]]out[[1,3]]State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.