Challenge: Implement Depth-First Search
In this lesson, you have to implement the depth-first search algorithm. A solution is placed in the "solution" section to help you, but we suggest you try to solve it on your own first.
We'll cover the following...
Problem statement
In this exercise, you have to implement the depth-first search traversal in Java. It is a searching algorithm for the graph which traverses down each branch depth-wise and backtracks after reaching a leaf node. We will use our already-implemented graph class for this task (since we have already covered the implementation of graph). ...