We want to sort the animals by their height. The tallest it to move to the rightmost yellow ball. Turn the ball red. The next tallest is to move to the rightmost yellow ball. Repeat until the animals are sorted by their height.
The tallest animal is moved to the rightmost yellow tennis ball, and
that ball is turned red.
The hare moves.
Two more animals have moved into position.
The animals are now in increasing order by height.