Mental Model
A bridge is an edge that, if removed, splits the graph into more parts. Tarjan's algorithm finds these by tracking when nodes can reach earlier nodes through other paths.
Analogy: Imagine a city connected by roads. A bridge road is one that, if closed, cuts off some neighborhoods from others. Tarjan's algorithm finds these critical roads by exploring all paths and seeing which roads are the only way to get back to earlier places.
Graph:
1 --- 2
\ |
3 |
\ |
4
Bridges:
Edges that if removed, split the graph.
Example: Edge 2-4 might be a bridge if no other path connects 2 and 4.