Skip to content

q03TopologicalSort

solutions.q03TopologicalSort

Question 3

Given the following DAG, algorithmically perform a topological sort.

\(\{A\to B,\; A\to C,\; B\to D,\; C\to D\}\)

Functions:

Name Description
q03TopologicalSort

Args:

q03TopologicalSort(G)

Parameters:

Name Type Description Default
G Graph

Graph resolves into G.V and G.E.

required