Create codespell.yml (#1698)

* fixup! Format Python code with psf/black push

* Create codespell.yml

* fixup! Format Python code with psf/black push
This commit is contained in:
Christian Clauss
2020-01-18 13:24:33 +01:00
committed by GitHub
parent c01d178798
commit bfcb95b297
78 changed files with 206 additions and 188 deletions
+4 -4
View File
@@ -7,12 +7,12 @@ class Graph:
def __init__(self):
self.vertex = {}
# for printing the Graph vertexes
# for printing the Graph vertices
def printGraph(self):
for i in self.vertex.keys():
print(i, " -> ", " -> ".join([str(j) for j in self.vertex[i]]))
# for adding the edge beween two vertexes
# for adding the edge between two vertices
def addEdge(self, fromVertex, toVertex):
# check if vertex is already present,
if fromVertex in self.vertex.keys():
@@ -22,10 +22,10 @@ class Graph:
self.vertex[fromVertex] = [toVertex]
def BFS(self, startVertex):
# Take a list for stoting already visited vertexes
# Take a list for stoting already visited vertices
visited = [False] * len(self.vertex)
# create a list to store all the vertexes for BFS
# create a list to store all the vertices for BFS
queue = []
# mark the source node as visited and enqueue it