Concept
A topological order lists the nodes of a directed acyclic graph so every edge points forward: dependencies before the things that need them. Kahn's algorithm peels off nodes with no remaining incoming edges.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Topological sort doing its job.
from collections import deque
def topo_order(graph, nodes):
indegree = {n: 0 for n in nodes}
for u in nodes:
for v in graph[u]:
indegree[v] += 1
queue = deque(n for n in nodes if indegree[n] == 0)
order = []
while queue:
n = queue.popleft(); order.append(n)
for v in graph[n]:
indegree[v] -= 1
if indegree[v] == 0: queue.append(v)
return order if len(order) == len(nodes) else None # None: a cycleReturning the partial order when the graph has a cycle. If the result has fewer nodes than the graph, there is a cycle, and the caller should be told rather than handed an incomplete list.
Your roadmap puts these before Topological sort, unless you already know them.
Once a session shows you understand Topological sort, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.