Answer
Using pseudocode to describe a variation of breadth-first search that assigns the integer m to the mth vertex visited in the search.
Work Step by Step
--We modify the pseudocode given in Algorithm 2 by initializing m to be 0 at the beginning of the algorithm, and adding the statements
--(“m := m + 1” )and “assign m to vertex v” after the statement that removes vertex v from L.