What goes in the blank?
# Kahn's topological sort
for v in graph[u]:
indeg[v] -= 1
if indeg[v] == ____:
queue.append(v)
Answer: 0
A node becomes ready once all its incoming edges are processed, i.e. its in-degree hits zero.
Play Problem Solving ▸