Algorithm · Meta · Hard
You are given a directed acyclic graph of n execution tasks, numbered from 0 to n-1. For each task i, the array dependencies[i] lists the IDs of every task that must finish successfully before task i can start. A second array fail[i] indicates whether task i is inherently faulty. A task is considered failed before scheduling begins if it is inherently faulty or if any of its dependencies is failed. Tasks are executed by a fixed pool of workerLimit workers. Execution proceeds…
Checking your access…