Which is the best data structure to implement topological sort on directed graph?
I have used Queue here still got the correct answer ? If I use stack i am getting wrong answer
@Kunal Kadian please help me out on this
I think your algo will give wrong ans if you add an edge from E to B.
Refer this:- https://www.geeksforgeeks.org/topological-sorting/
Please refer to this article :