graph exercises for section 10 4 self check 1
Show the breadth-first search trees for the following graphs.
Show the depth-first search trees for the graphs in Exercise 1 above.
PROGRAMMING
Provide all accessor methods for class DepthFirstSearch and the constructor that specifies the order of start vertices.
Implement method depthFirstSearch without using recursion. Hint: Use a stack to save the parent of the current vertex when you start to search one of its adjacent vertices.