Pancake Sorting

The cook at the Sunrise Cafe is sloppy. When she prepares pancakes, they all come out a different size. The server, however, is tidy. Before he delivers a stack to a customer, he rearranges the pancakes in order of size, with the smallest one on top and the largest on the bottom. To do so, he grabs several pancakes from the top and flips them over.