Complexity for self reference: The complexity of the algorithm could have been reduced to O(m+n) if we had got the dependency as a DAG. We just then keep a list of in-degrees of each vertex and once its zero, we consider it processed.
Hi Vedant, the entire playlist was good, one feedback would be where you;re writing lengthy code like in the above video , try to use debugger and run through one testcase for better understanding
Complexity for self reference: The complexity of the algorithm could have been reduced to O(m+n) if we had got the dependency as a DAG. We just then keep a list of in-degrees of each vertex and once its zero, we consider it processed.
Nicely explained
just use topological sort don't make it complex man
Hi Vedant, the entire playlist was good, one feedback would be where you;re writing lengthy code like in the above video , try to use debugger and run through one testcase for better understanding
Nice explanation...keep uploading such video.
Great video 😊
What if in the initial List there is no task which have empty dependency but there are no cycles formed?
This is not for fresher level . Right?