Problem 42498. Pancake sorting - minimum flips.
- There are N pancakes with diameters 1:N.
- Spatula can be inserted anywhere in the stack and used to flip all the pancakes above.
- Sort pancakes in increasing order.
- Return a vector of places where spatula was inserted.
- Minimize number of flips, your score will depend on the number of flips in the last few tests.
- References: math.illinois.edu, wikipedia.
Solution Stats
Problem Comments
-
5 Comments
Lincoln, I checked the reference solution and it showed that the manual scoring system no longer works.
I will see what changes I can do and notify it here.
Unfortunately, the scoring system is broken (same as in the TRON challenge by Alfonso).
No way to get the Indexing IV badge :-(
@Stefan, I have commented out the part that outdated and the test suite is working now.
I have rescored your solution, you can now (hopefully) get the Indexing IV badge!
Solution Comments
Show commentsProblem Recent Solvers32
Suggested Problems
-
Return the 3n+1 sequence for n
8379 Solvers
-
Return unique values without sorting
954 Solvers
-
Create a Multiplication table matrix...
637 Solvers
-
Count letters occurence in text, specific to words with a given length.
172 Solvers
-
Sorting integers by their digits (Level 1)
79 Solvers
More from this Author40
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!