In the simplest pancake sorting algorithm, the maximum number of flips is 2n−3.
This elementary method works like selection sort. It finds the largest pancake still out of place, flips it to the top of the unsorted portion, and then flips that portion again to put the largest pancake into its final position.
Most rounds therefore use two flips. The final remaining pancake needs no flip, and the structure of the first and last stages reduces the overall bound to 2n−3 rather than 2n. The expression is an upper bound for this particular straightforward algorithm, not the exact minimum for every stack.
That distinction matters. Pancake sorting asks for the shortest possible sequence of prefix flips, and the true worst-case minimum is a separate mathematical problem. Its exact value is not known in general; established bounds place it between roughly 1.07n and 1.64n. The algorithmic bound is easier to prove but is not always optimal.