(self)
| 25 | self.vertex[fromVertex] = [toVertex] |
| 26 | |
| 27 | def DFS(self): |
| 28 | # visited array for storing already visited nodes |
| 29 | visited = [False] * len(self.vertex) |
| 30 | |
| 31 | # call the recursive helper function |
| 32 | for i in range(len(self.vertex)): |
| 33 | if visited[i] == False: |
| 34 | self.DFSRec(i, visited) |
| 35 | |
| 36 | def DFSRec(self, startVertex, visited): |
| 37 | # mark start vertex as visited |
no test coverage detected