Question 14
A beaver wants to reorder the four balls as shown. Initially, from bottom to top, they are gray, striped, dotted, white; the target is dotted, striped, gray, white.

Each move is one of the following:
- Transfer the bottom ball to a waiting tray, which holds at most one ball.
- Move the bottom ball to the top of the main stack.
- Move the waiting-tray ball to the top of the main stack.

What is the minimum number of moves?

Each move is one of the following:
- Transfer the bottom ball to a waiting tray, which holds at most one ball.
- Move the bottom ball to the top of the main stack.
- Move the waiting-tray ball to the top of the main stack.

What is the minimum number of moves?