Graph TheoryEasyGraph Algorithms
Graph Algorithms · Easy problem
A graph has vertices and edges . Running a DFS from that visits each vertex's unvisited neighbors in alphabetical order reaches for a second time through the edge , which turns out to be a back edge. What is the length (number of edges) of the cycle that this back edge forms together with the DFS tree path between and ?