FastPrepFastPrep
Problem Brief

Team Formation

INTERNOA

Given n developers, each developer i has:

  • lowerSkill[i]: max number of team members with skill less than theirs
  • higherSkill[i]: max number of team members with skill greater than theirs

Form the largest team such that every developer is okay with their relative skill positions.

1Example 1

Input
lowerSkill = [1, 3, 2, 2, 2], higherSkill = [2, 2, 1, 1, 3]
Output
3
Explanation
Agoda probably does not provide the explanation for the example...
public int formLargestTeam(int[] lowerSkill, int[] higherSkill) {
  // write your code here
}
Input

lowerSkill

[1, 3, 2, 2, 2]

higherSkill

[2, 2, 1, 1, 3]

Output

3

Sign in to submit your solution.