Your friend will put 100 balls with 5 different colors in a bag and tell you the number of balls for each color. Then you will randomly choose a ball and guess its color. Afterr seeing the ball, if your guess is correct, you will take the ball. If not, then your friend will take the ball. This game will continue until all the balls are taken. Both of you try to get as many balls as you can.
What is the maximum number of balls your friend can take?
This is a worst case problem. Therefore we don't have to compute probabilities or expectations.
It may very well be that the last two remaining balls are of different colors; hence we have different colors available at each of the first $98$ steps. It may be that you guess wrong at each of these steps, even if you choose each time the color with the largest number of remaining balls. You then may make the wrong choice also on the $99^{\rm th}$ step, so that your friend now has $99$ balls. At this point you know the color of the last remaining ball, and you will therefore "guess" its color correctly. The answer to the question therefore is $99$.