![]() |
Why you use DFS and BFS in graphs?In: Computer Games |
[Edit] |
[Edit]
DFS and BFS are both searching algorithms.
DFS, or depth first search, is a simple to implement algorithm, especially when written recursively.
BFS, or breadth first search, is only slightly more complicated.
Both search methods can be used to obtain a spanning tree of the graph, though if I recall correctly, BFS can also be used in a weighted graph to generate a minimum cost spanning tree.
First answer by ID1276999292. Last edit by ID1276999292. Question popularity: 5 [recommend question]





