Depth first search algorithm in Java Sample Data For this gist, let’s consider this tree as our data. A <--------- | | | B <- -> C | | | |