Color DFS

當unvisited已經不夠用時,用color來表示node traversal的狀態。

用來辨別node的group。

color[i]: 0 : unvisited 1 : group#1 2 : group #2 ...

Last updated

Was this helpful?