Sponsored
Use these hints if you're stuck. Try solving on your own first.
Keep track of the number of balls of each color for each user using hashing.
Find the maximum color that occurred for each player.
Solve with full IDE support and test cases