I actually understood the method done in Euler Tour algorithm but don't understand why it works? Here is the pseudo.
dfs (v): color[v] = gray for u in adj[v]: erase the edge v-u and dfs(u) color[v] = black push v at the end of e
Why does the Eulerian Tour Algorithm actually work?
I actually understood the method done in Euler Tour algorithm but don't understand why it works? Here is the pseudo.
dfs (v): color[v] = gray for u in adj[v]: erase the edge v-u and dfs(u) color[v] = black push v at the end of e