Halloween Sale
Unlock all premium questions for over 30% off
Ball Picking Contest
Question
Balls stand in a line, and two players, Player One and Player Two, take them in alternating turns, Player One going first. Each player's score is 0 when play begins. Whoever is to move removes the first ball, or the first two balls, of what is left of the line. Every ball carries an integer value, possibly negative, which is added to the score of the player who takes it. A taken ball leaves the game for good. Each side is out to finish with the biggest profit it can get for itself. Play continues until the line runs out. ...
More Google interview questions
- Maximum Flying Distancehard
- Largest Tree Root IDmedium
- Find Median In Large Unsorted Arraymedium
- Highway Checkpoint Tollsmedium
- Grep Command With Context Linesmedium
- Design Unix Find Command With Filtershard
- Paint a Row of Houseshard
- Employee Shift Timeline Intervalsmedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.