You are given a set of n tasks to be performed. The ith task takes ti units of time to complete. You are given a set of dependencies, (u, v), meaning that task u must be completed before task v can start. You may assume that there are no cyclic dependencies. Present an O(|V | + | E |) time algorithm which, given the times ti and the dependencies, determines the minimum time needed to complete all the
tasks.