To all those who say the question/solution is wrong

In the example, if I go on removing 1B and 1R bal ->
14R, 0B ( I’ll be left with 14R balls and 0 Blue balls)
Now I will have to remove 2 balls of the same color, giving:
12R, 1B
Now you will remove 1R and 1B in this case:
12R, 0B;
Remove 2R to get:
10R, 1B
Again this gives:
10R, 0B;
Go on and on to get 2R and 0B;
You remove the last two R to get 1B!!!

Click here to start solving coding interview questions