MCPcopy Create free account
hub / github.com/djeada/Algorithms-And-Data-Structures / dfs

Function dfs

src/graphs/python/dfs/src/dfs.py:10–50  ·  view source on GitHub ↗

Find a path between source and destination using DFS. Note: DFS does not guarantee the shortest path. For shortest paths, use BFS (unweighted) or Dijkstra/Bellman-Ford (weighted). Args: graph: The graph to search. source: The starting vertex. desti

(graph: Graph, source: Vertex, destination: Vertex)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls 3

searchFunction · 0.70
containsMethod · 0.45
verticesMethod · 0.45