Logo
IconChallenge
Icon
IconProblem
IconSolutions
IconSubmissions

Earliest Time to Finish One Task

XPChallenge Points: 10
levelLevel: Easy

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

Example 1:

Input: tasks = [[2, 5], [4, 1]]

Output: 5

Example 2:

Input: tasks = [[10, 3], [5, 10], [8, 1]]

Output: 9

to Continue
like
dislike

Accepted:

Submission:

IconReport an issue
Icon
IconCode
IconYou need toto run or submitYou need toto run or submit
IconTest Case
IconTest Result