5720脑筋急转弯中等brainteasermedium
Sorting Pancakes by Spatula Flips
题目
A stack of four pancakes has diameters, from top to bottom, (all distinct). The only allowed move is to insert a spatula under any pancake and flip the entire block above it, reversing the order of that top prefix. You want the pancakes sorted with the largest on the bottom and the smallest on top (i.e. top-to-bottom ). What is the minimum number of flips required?
解题计时
0:00
提交作答时记录,用于后续平均用时统计。
你的答案