Company: Agoda_16nov
Difficulty: medium
Find Minimum Effort Problem Description As part of an initiative to make rejoining work post-maternity leave easier, you need to optimally assign techie mothers to team projects based on their skills. You have n developers with IDs from 0 to n-1, and their skills are denoted by developerSkill[i] for the i-th developer. A team of k developers needs to be formed to work on a project of difficulty x. The effort required for a team on a project is calculated as: effort = sum(i=0 to k-1) |skill[i] - x| Here |a| represents the absolute value of a, and skill[i] represents the skill of the i-th developer from the chosen group of k developers. Your task is to find the minimum team effort possible by selecting the optimal team and project difficulty. Note that the chosen difficulty x can only be an integer value. Complete the function findMinimumEffort in the editor with the following parameters: * int developerSkill[]: the skill level of developers * int k: the required team size Returns: long_