0

Flipping Burnt Pancakes, but Optimally!
This is based on the Burnt Pancake problem.
For a given array, determine the minimal number of flips needed to be made burnt pancake sorting.
Note that this is an NP-HARD problem. You may not make an approximation algorithm.
Testcases
[1,2,3,4,5] returns 0,...