Company: citadel_1aug
Difficulty: medium
Optimal Team Size Problem Description There are n developers, where the skill level of the i th developer is given by i , for 1 . The task is to form a team for a hackathon. A developer agrees to be on a team only if certain conditions are met. Given two arrays, lowerSkill and higherSkill , the i th developer will join the team if at most lowerSkill[i-1] team members have a lower skill level than them, and at most higherSkill[i-1] team members have a higher skill level than them. (Note: The arrays are 0-indexed, so lowerSkill[i-1] and higherSkill[i-1] correspond to the i th developer with skill level i ). The objective is to select the largest possible team such that every developer on the team agrees with the team composition based on these conditions. Complete the function getOptimalTeamSize in the editor below. The function accepts the following parameters: int n: The total number of developers. int lowerSkill[n]: An array where lowerSkill[i] is the maximum number of team members de