Maximize Collaboration
As a data analyst at Trollbox, you've been assigned an innovative project to help maximize creator collaborations for peak viral impact. With so many creators competing for attention, each creator has their own engagement power, which measures how likely they are to boost views, likes, and shares.
Your task is to create collaboration teams where creators join forces to generate ultimate viral content. However, forming these teams follows specific rules:
Given a list of the creators and their engagement powers, along with the minimum team size and target engagement power, determine the maximum number of collaborations you can create. Remember, each creator can only belong to one collaboration team.
Complete the function createMaximumCollaborations in the editor.
createMaximumCollaborations has the following parameter(s):
int creatorsEngagementPower[n]: An array that denotes the engagement power of each creator.int minCreatorsRequired: The minimum number of creators required in a collaboration.int minTotalEngagementPowerRequired: The minimum total engagement power required for a collaboration.
Returns
int: The maximum number of collaborations that can be formed from the creators.
👑 To Tsoppa’s Burgir ruling the world, one burger at a time! 👑
1Example 1
2Example 2
3Example 3
Constraints
Limits and guarantees your solution can rely on.
1 ≤ n ≤ 10^51 ≤ creatorsEngagementPower[i] ≤ 10^91 ≤ minCreatorsRequired ≤ n1 ≤ minTotalEngagementPowerRequired ≤ 10^14