121. Bridges in an Undirected Graph
HardGraphs
An undirected graph has n vertices (0 to n − 1) and edges as pairs [u, v], with no duplicate edges or self-loops. A bridge is an edge whose removal increases the number of connected components.
Return every bridge as [u, v] with u < v, and sort the list ascending by u, then by v.
Example 1
Input: n = 4, edges = [[0,1],[1,2],[2,0],[1,3]] Output: [[1, 3]]
Constraints
1 ≤ n ≤ 10⁴0 ≤ edges.length ≤ 10⁴