Solution Review 3: Topological Sorting of a Graph
This review provides a detailed analysis of the solution to topologically sort a graph.
We'll cover the following...
Solution: Using Recursion
Let’s have a look at the algorithm to solve this problem:
function helperFunction(currentNode) {
// mark currentNode visited
for (each vertex v that has an edge from currentNode to v) {
...Access this course and 1400+ top-rated courses and projects.