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↵
↵
↵
↵
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
Here is the pseudo.↵
↵
color[v] = gray↵
for u in adj[v]:↵
erase the edge v-u and dfs(u)↵
color[v] = black↵
↵
↵
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




