Tarjan's Algo

Tarjan's Algorithm to find Articulate point

Link Video

Traverse node, 紀錄每個node是第幾步(step), dfs 之後update其可以接觸的最小node以判斷是否cycle

Articulate point 發生在

  1. Node u 沒有parent(起始點)且有大於兩個subtree時

  2. Node u有parent, 且有一個child v及其subtree not chaining back to on of ancestors of u

1192 Critical Connections in a Network (find edge)

Last updated

Was this helpful?