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:

Topological Sorting

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

Spread the love