Maximize Collaboration

Problem Overview

  • Determine the maximum number of collaboration teams by grouping adjacent creators in posting order.
  • Input: creatorsEngagementPower array, minCreatorsRequired, minTotalEngagementPowerRequired; Output: integer count. Constraints up to n=1e5, powers up to 1e9, total up to 1e14.
  • Real-world: data analyst optimizing creator collabs for viral reach at Trollbox; teams must meet minimum size and total engagement, and each creator can join only one team.
  • From Tiktok interviews; a coding interview interview question problem.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: