A team of software developers is working on a new application with n
features to implement. Each feature requires specific resources for development: they are either built from scratch or integrated using an existing library.
Given two arrays of size n
, developmentTime
and integrationTime
, where developmentTime[i]
(0 ≤ i < n) represents the estimated hours needed to develop the i
th feature from scratch, and integrationTime[i]
(0 ≤ i < n) represents the estimated hours to integrate the feature from the library.
The integration of features using an existing library is performed only by the team lead, while the development of features can be distributed among team members (assuming there are more than n
team members). Thus, the development of features takes place simultaneously while the integration is sequential.
The task is to implement all the features in the minimum possible time and return this minimal development time.
Function Description
Complete the function getMinimumDevelopmentTime
in the editor.
getMinimumDevelopmentTime
has the following parameters:
- 1.
int[] developmentTime
: an array of integers representing the hours needed to develop each feature - 2.
int[] integrationTime
: an array of integers representing the hours needed to integrate each feature
Returns
int
: the minimum development time
( ˶ˆᗜˆ˵ ) All credit goes to our GG of Error-Free Excellence - spike!
Example 1:
Input: developmentTime = [10, 12, 13, 8, 15], integrationTime = [1, 2, 1, 1, 1]
Output: 6
Explanation:If the team lead integrates all the features using the libraries, it requires 1 + 2 + 1 + 1 + 1 = 6 units of time. Since this is less than 8, the minimum development time, there is no need to consider developing a feature.
Hence, the minimum time required is 6 hours.
🍑🍑

input:
output: