How ball sort puzzle works?

1.1k Views Asked by At

Ball sort puzzle is that offline game, there is also another form of this game called water sort puzzle. In the game there are n stacks containing different colors of balls. There are 4 balls of each color and in total 4n balls. Out of that, there are 2 empty stakes provided for the players to sort the balls by their color. In the sorting process several basic principles need to be followed.

  1. only top ball of each stake can be removed
  2. a ball can be left on another if they are the same color (except the situation that this stake is empty)

I am wondering why there are only two empty stakes provided no matter how many colors of balls are there? Or is there always a solution to the game no matter the value of n is large or small?