It will solve all the stacks in the test stacks file. Meng gave the suggestion to move the largest pancake to the bottom of the pile in two flips. You move the next largest to the 2nd to bottom spot and repeat. This would have a Big O run time of n^2. This is not an optimal solution. According to sources the minimum flips lies between 15/14n and 18/11n.