what if we will not have any node with indegree zero in the very starting !
What if we will not have any node with indegree zero in the very starting
hello @Shivani999
in that case topological sort will not exist.
this will happen only when ur graph contain cycle.
for example
1-> 2 , 2-> 3 , 3-> 1
for this graph topological sort will not exist because no node is having indegree 0.