Open ih4cku opened 8 years ago
Graph representation:
BFS and DFS:
BFS:
DFS:
and
http://stackoverflow.com/questions/9201166/iterative-dfs-vs-recursive-dfs-and-different-elements-order http://stackoverflow.com/questions/21508765/how-to-implement-depth-first-search-for-graph-with-non-recursive-aprroach
Many problems can be stated in term of
paths
in thegraph
constructed using theedges
.