Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion graphs/basic_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ def dijk(G, s):
from collections import deque


def topo(G, ind=None, Q=[1]):
def topo(G, ind=None, Q=None):
if Q is None:
Q = [1]
if ind is None:
ind = [0] * (len(G) + 1) # SInce oth Index is ignored
for u in G:
Expand Down