Company: CITADEL Full stack developer off campus_11april
Difficulty: medium
There are n developers, where the skill level of the i th developer is given by i , for 1 ≤ i ≤ n . The task is to form a team of developers for a hackathon. A developer agrees to be on the 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] team members have a lower skill level than them, and at most higherSkill[i] team members have a higher skill level than them. 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. Example Given n = 5, lowerSkill = [1, 3, 2, 2, 2], higherSkill = [2, 2, 1, 1, 3] It is [unclear] select developers with skill levels 1, 3, and 4. For the developer with skill level 1, there are two developers with higher skill levels and higherSkill[1] = 2. For the developer with skill level 3, there is one developer with a lower skill level and one with a higher skill leve