Total Efficiency
Problem Overview
- Pair all participants into teams of two so each pair has the same skill sum; return the sum of team efficiencies (product of skills) or -1 if pairing is impossible.
- Input: array of integers representing skills; Output: long total efficiency; all candidates must be used; the valid total is unique.
- Context: HackerRank coding competition scenario modeling fair team formation.
- From Ibm interviews; a coding interview problem and interview question assessing pairing and aggregation understanding.
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:
