Skip to content

s1ssagar/dfs_implementation_using_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dfs_implementation_using_python

I am using python version 2.7

Before executing the dfs code, you should keep in mind that we are importing stack from Stack. Both stack.py and dfs.py should be in the same folder. Also you requrie an input file that will have the details of graphs.

DFS requires and file name arcs.txt, that you can edit later. The file "arcs.txt" has the details of the all vertices used in graphs and how they are connected. You can select your start point from the code. The format of "arcs.txt" file should not be changed. The format is as follows - S -> A S -> B S -> C A -> D D -> H B -> E E -> F F -> G C -> I

Here my graph starts from "S" vertex.

Releases

No releases published

Packages

No packages published

Languages