Rerun Affected Tasks After Changes
In a task dependency system, [a, b] means task a depends on task b; therefore, when b changes, a must be rerun.
Given n tasks, dependency pairs prerequisites, and directly changed tasks...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
