Category Archives: Topological Sort

Topological Sort

https://www.youtube.com/watch?v=Q9PIxaNGnig/

code:

Output:

Time Complexity: O(V+E)
Space Complexity: O(V)
V for vertex E for edge

code courtesy:
http://www.geeksforgeeks.org/topological-sorting/

I understood the theory but need to understand the code well later