You are given a 2D integer array tasks, where each element tasks[i] = [si, ti] represents a task:
• si → the start time of the task
• ti → the duration (time units required to finish it)
Your goal is to find the earliest time when at least one of the given tasks is completed.
The finish time for each task is computed as:
finish_time = si + ti
Input: tasks = [[2, 5], [4, 1]]
Output: 5
Input: tasks = [[10, 3], [5, 10], [8, 1]]
Output: 9
Accepted:
Submission: