Update dfs(Depth First Search) with visualization