You are given a tree with n tasks labeled from edges of length edges[i]
You are also given an integer array baseTime of length n, where baseTime[i] represents the base execution time of task i.
The tasks are executed according to the following rules:
If a task is a leaf node (it has no children), its finish time is equal to baseTime[i].
If a task has children, let earliest and latest be the minimum and maximum finish times among all its direct children, respectively.
The duration of the task itself is calculated as:
You are given a tree with n tasks labeled from edges of length edges[i]
You are also given an integer array baseTime of length n, where baseTime[i] represents the base execution time of task i.
The tasks are executed according to the following rules:
If a task is a leaf node (it has no children), its finish time is equal to baseTime[i].
If a task has children, let earliest and latest be the minimum and maximum finish times among all its direct children, respectively.
The duration of the task itself is calculated as: