Skip to content

Practice Earliest Possible Day of Full Bloom

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Hard#2136
LeetCode Problem

Earliest Possible Day of Full Bloom

Problem Statement

Starting on day 0, spend each full day planting one seed. Seed i needs plantTime[i] planting days, which need not be consecutive, then growTime[i] full days of growth after planting finishes. Growth runs while other seeds are planted. Return the earliest day all flowers have bloomed; flowers remain bloomed thereafter.

Source: Earliest Possible Day of Full Bloom on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
plantTime = [1,4,3], growTime = [2,3,1]
Output
9

# Example 2

Input
plantTime = [1,2,3,2], growTime = [2,1,2,1]
Output
9

# Example 3

Input
plantTime = [1], growTime = [1]
Output
2

Constraints

n == plantTime.length == growTime.length
1 <= n <= 10^5
1 <= plantTime[i], growTime[i] <= 10^4

Related LeetCode Problems

Practice more problems similar to Earliest Possible Day of Full Bloom.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.