Pancake Sort Strategy: Fewer Flips with Adjacencies
Updated October 2026
Pancake Sort hands you a shuffled stack of eight pancakes and one move: choose a pancake, and it flips over together with everything above it. Your score is the number of flips it takes to get the biggest at the bottom and the smallest on top, and lower is better. Anyone can finish with a simple routine. Getting close to the best possible count takes a different way of looking at the stack. This guide explains both, with numbers from an exhaustive search of every possible starting stack.
The move, exactly
The stack holds eight pancakes numbered 1 to 8 by size, and each one is drawn with its number and its own colour, from pale yellow for 1 to deep green for 8. Tapping a pancake turns over the part of the stack that starts at that pancake and goes up to the top. The pancakes below the one you tapped never move.
Some details worth knowing:
- A tap only counts when it lands on the pancake itself or within a few pixels of its sides, so the narrow pancakes near size 1 need a more careful aim.
- Each flip plays a short animation of a little over a quarter of a second, and taps during it are ignored. Wait for the stack to settle before the next tap.
- Tapping the top pancake would flip it on its own, which changes nothing, so the game ignores that tap and does not count it.
- The game never deals an already sorted stack. The game ends as soon as the stack is sorted.
- Pancakes that are already in their final place from the bottom up, with no gap, get a bright yellow outline. That outlined part is finished; any flip that reaches into it undoes work.
How good can a score be?
Eight pancakes can be stacked in 40,320 orders, few enough to compute the best answer for every one of them. We ran a full search using the game's own move. In our search, every one of the 40,319 unsorted stacks can be solved in at most 9 flips, and only 455 of them, about 1.1 percent, actually need all 9. The most common best answer is 7 flips, which covers about 37 percent of stacks; 6 covers about 26 percent and 8 about 21 percent. The average over all stacks is about 6.6.
Those numbers give you a scale. A finish in 6 or 7 flips is usually perfect or close to it. Around 9 is a decent result. Anything in the double digits means some flips were spent undoing earlier ones.
The reliable routine
The method most people learn first places one pancake per round, starting with the largest:
- Find the largest pancake that is not yet in its final place.
- If it is not already on top, tap it. It rides up to the top of the stack.
- Tap the pancake that sits in the target position for it, the lowest spot that is not yet outlined. The whole upper part flips and the large pancake lands exactly there.
Repeat until the stack is done. Each round costs at most two flips and adds at least one more outlined pancake. In our search this routine averaged about 8.8 flips and never needed more than 13. That is safe, but on average it spends more than two flips above the best possible score. The waste comes from the fact that it ignores everything except the one pancake it is placing.
Think in adjacencies, not positions
A better way to look at the stack is to check every pair of touching pancakes. A pair is good when the two sizes are consecutive, such as 5 on 6 or 3 below 2. Treat the plate as a pancake of size 9, so the bottom pair is good only when 8 is at the bottom. The finished stack has every pair good. Call each bad pair a break.
Here is why this is useful. A flip only ever changes one contact: the one between the pancake you tapped and the one below it. Every other pair inside the flipped part stays touching, just upside down. So one flip can fix at most one break, and the number of breaks is a hard lower limit on your score. In our search the average starting stack had about 6.1 breaks. The best possible score was exactly the break count for about 54 percent of stacks and at most one more than the break count for about 95 percent.
That gives you a target before you make a single move. Count the breaks. If there are six, a score of 6 is possible more often than not, and 7 is almost always possible.
A practical method that uses breaks
On each turn, look for a flip that fixes a break. You want a pancake somewhere in the stack whose size neighbour is currently on top. Tap the pancake just above the one that should touch the top pancake, and the top pancake drops onto it. For example, if 4 is on top and 5 sits lower down, tap whatever is directly above 5. The run from that pancake to the top flips over, and 4 lands on 5.
When no flip fixes a break, fall back on one round of the reliable routine. That keeps the game moving without undoing your good pairs. In our search this mixed approach averaged about 7.5 flips, a full flip and a third better than the routine on its own. It is not perfect: on rare stacks it can be worse, with a worst case of 14. Players who also look one move ahead, choosing between several break-fixing flips the one that sets up another, get closer still to the best possible score.
Remember that groups of good pairs travel together. Once 3, 2 and 1 are touching in either order, you can treat them as one thick pancake. Flipping it over just reverses the group. Three or four such groups are much easier to sort in your head than eight separate pancakes.
Reading the stack before you tap
Because the score counts every flip, the moments before your first tap are free. Use them:
- Count the breaks to know your target.
- Note whether 8 is already on the plate. In our search that happens in about one stack in eight, and it gives you a finished bottom for free.
- Look for the largest group that is already touching in order. Building around it is usually cheaper than building around the largest pancake.
- Decide your first two flips before you make either. Planning in pairs is far easier than planning one at a time.
Common mistakes
The costliest habit is tapping into the outlined part, which breaks a finished pair to set up something else and almost always costs two flips to repair. Another is flipping a group that is already in order the wrong way up and then spending a flip to turn it back; if a group will need to be reversed later anyway, do it at the moment it also fixes a break. (A tap on the top pancake is simply ignored, so a slip there costs nothing.) Your fewest flips are saved on your device as your best, and any finished stack can be sent to the Hall of Fame from the end card.
▶ Play Pancake Sort Flip the stack into order from largest to smallest in as few moves as you can.