1

Looking for some code examples with explanation. Wikipedia is too abstract on this.

Proud Member
  • 40,078
  • 47
  • 146
  • 231

2 Answers2

3

You could check the Wikipedia sources. Here's what I found for you:

http://www.algolist.net/Algorithms/Graph/Undirected/Depth-first_search

It gives example and some code sample. Pretty easy to follow.

Simon Dufour
  • 184
  • 7
0

Get Complete Implementation of DFS in Java using Tree here http://c-madeeasy.blogspot.com/2011/08/dfsdepth-first-search-program-in-java.html

techno
  • 6,100
  • 16
  • 86
  • 192