## Invitation to Computer Science 8th Edition

The question suggests that the second algorithm for the Flipping Pancakes is not faster for any number of pancakes. To check whether this is true and to find the least number of pancakes required for the second algorithm to become more efficient we will do the following: $2 \cdot n-3=\frac{5 \cdot n+5}{3}$ We find that $n$ is $14 .$ This means that at 14 pancakes both algorithms have the same number of most flips needed. Once we have more than 14 pancakes, the second algorithm is more efficient.