Created
May 15, 2020 22:48
-
-
Save Youngestdev/f8cb6ad9461c8c8802e42941274a9e0f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class WeightedGraph: | |
| pass | |
| def DFS(self, i, visited): | |
| v = self.graph[v] | |
| idx = self.graph.index(v) | |
| visited[idx] = True | |
| print(v, end="") | |
| for i in v: | |
| if not visited[i]: | |
| self.DFS(i, visited) |
Author
Oh yeah lol. That was the first idea. I’m not taking the weighted values into consideration.
Alright.
Author
Gotten an idea on how to go about it?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmmm, doesn't look right somehow.