Here’s a more comprehensive illustration of how to implement Depth-First Search (DFS): Take a look at this Directed Acyclic Graph: 7 -> 8 -> 9 ^ | | V 5 -> 6 -> 4 -> 2 -> 1 ^ | 3 We begin with the nodes that have no incoming edges, which are 5 and 7. We can choose to start from either 5 or 7, leading to multiple potential topological orderings. Here are the possible topological orderings for the directed graph: (7, 5, 3, 6, 4, 8, 2, 1, 9) (5, 7, 3, 6, 4, 8, 2, 1, 9) (5, 3, 7, 6, 8, 4, 2, 1, 9).