Skip to content

Commit 340d616

Browse files
committed
Fixed lgtm issue per @cclauss recommendation in TheAlgorithms#1024
1 parent e4e3c6a commit 340d616

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: graphs/basic_graphs.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def dijk(G, s):
141141
from collections import deque
142142

143143

144-
def topo(G, ind=None, Q):
144+
def topo(G, ind=None, Q=None):
145+
if Q is None:
146+
Q = [1]
145147
if ind is None:
146148
ind = [0] * (len(G) + 1) # SInce oth Index is ignored
147149
for u in G:

0 commit comments

Comments
 (0)