What is the run time of DFS if the graph is not connected (no proof is necessary)? code example
Example: dfs runtime
O(# of node visits + # of edge scans)
incur |V| time steps, plus the time incurred to visit adjacent nodes (essentially, these form an edge, and we have a total of |E| edges, hence,