mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-12 04:18:02 +00:00
@@ -2,6 +2,7 @@ from enum import Enum # Python 2 users: Run pip install enum34
|
||||
|
||||
|
||||
class State(Enum):
|
||||
|
||||
unvisited = 0
|
||||
visiting = 1
|
||||
visited = 2
|
||||
@@ -64,4 +65,4 @@ class Graph:
|
||||
if src_key is None or dst_key is None:
|
||||
raise TypeError('key cannot be None')
|
||||
self.add_edge(src_key, dst_key, weight)
|
||||
self.add_edge(dst_key, src_key, weight)
|
||||
self.add_edge(dst_key, src_key, weight)
|
||||
|
||||
Reference in New Issue
Block a user