Minimum time taken by each job to be completed given by a directed acyclic graph

1 min read

https://www.geeksforgeeks.org/minimum-time-taken-by-each-job-to-be-completed-given-by-a-directed-acyclic-graph/

Simply implement Kahn’s algorithm with a jobs array adding 1 to each layer of the topo traversal

Implement topological sort
Find whether it is possible to finish all tasks from given dependencies