Score Difference
Problem Overview
- Evaluate a two-player game on an integer sequence and compute first_score - second_score.
- Each round, a player takes the first number; if it’s even, reverse the remaining sequence.
- Input: sequence of n integers; Output: score difference; constraints not specified.
- Real-world context: game scoring and sequence manipulation.
- This coding interview problem is an IBM interviews interview question, suitable as a challenging 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:
