|
@ -12,7 +12,7 @@ class Graph: |
|
|
# default dictionary to store graph |
|
|
# default dictionary to store graph |
|
|
self.graph = defaultdict(list) |
|
|
self.graph = defaultdict(list) |
|
|
|
|
|
|
|
|
# function to add an edge to graph |
|
|
|
|
|
|
|
|
|
|
|
def addEdge(self, u, v): |
|
|
def addEdge(self, u, v): |
|
|
self.graph[u].append(v) |
|
|
self.graph[u].append(v) |
|
|
|
|
|
|
|
|