Skip to content

s1ssagar/bfs_implementation_using_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

bfs_implementation_using_python

I am using python version 2.7

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

BFS 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