[C++, Python, Java] Topological Sort
Topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v i
Topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering.\n\nTopological sort steps:\n* Find a vertex that has indegree = 0 (no incoming edges)\n* Add that vertex to the array representing topological sorting of the graph\n* Since we have reached this node decrease the indegree of all the nodes that are supposed to come after this node\n* Repeat till there are no more vertices left.\n\n<iframe src="https://leetcode.com/playground/audDyjEZ/shared" frameBorder="0" width="900" height="600"></iframe>
['Topological Sort', 'C', 'Python', 'Java']