Artificial Intelligence

Depth First Search

Step 3: Node B is removed from fringe, and its children D and E are pushed in front of fringe.

Step 4: Node D is removed from fringe. C and F are pushed in front of fringe.

Step 5: Node C is removed from fringe. Its child G is pushed in front of fringe.

Step 6: Node G is expanded and found to be a goal node. The solution path A-B-D-C-G is returned and the algorithm terminates.