DoorDash Interview Question

question about topology sort / DFS