For Exercises 7–10, write the nodes in a depth-first search of the following graph, beginning with the node
specified.
7. a
8. e
9. f
10. h
For Exercises 11–16, write the nodes in a breadth-first search of the graph for Exercises 1–6, beginning with
the node specified.
11. a
12. c
13. d
14. g
15. e
16. h
For Exercises 17–20, write the nodes in a breadth-first search of the graph for Exercises 7–10, beginning with
the node specified.
17. a
18. e
19. f
20. h
For Exercises 21–24, write the nodes in a depth-first search of the following graph, beginning with the node
specified.
21. a
22. g
23. f
24. e
Section 7.4 Traversal Algorithms
605
Précédent

- 622/986

Suivant