Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 604 Bytes

File metadata and controls

12 lines (9 loc) · 604 Bytes

Depth First Search - DFS

  • Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking. Extra memory, usually a stack, is needed to keep track of the nodes discovered so far along a specified branch which helps in backtracking of the graph.

  • Solution

Running

  • Running with an instance included:
    python instance.py