Get Exp.
Problem Overview
- Pair the highest and lowest experience points iteratively and record each pair’s average.
- Input: even-sized array of n (2–1e5) with 0 ≤ exp[i] ≤ 1e9; Output: the count of distinct average values.
- Real-world context: forming balanced hackathon pairs at a tech company.
- From Amazon interviews; a classic coding interview problem and interview question.
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:
