Read Weiss, 9.6 Depth-First Search and 10.5 Backtracking Algorithms
Read Weiss, 9.6 Depth-First Search and 10.5 Backtracking Algorithms
Read Weiss, 9.6 Depth-First Search and 10.5 Backtracking Algorithms
Depth-First Search
Text
• Read Weiss, § 9.6 Depth-First Search and § 10.5
Backtracking Algorithms
Requirements
• Also called Depth-First Search
• Can be used to attempt to visit all nodes of a
graph in a systematic manner
• Works with directed and undirected graphs
• Works with weighted and unweighted graphs
Walk-Through
Visited Array
F C A
A B
B C
D
H D
E
G E F
G
H