Pancake sorting πŸ₯ž

Sort an array of integers into ascending order using Pancake sorting.

Instead of individual elements being sorted, the only operation allowed is to "flip" one end of the list. E.g. array [3,2,4,1,0] after the flip up to the element with value 4 becomes [4,2,3,1,0].

Problem at Leetcode.

Hi πŸ‘‹
I can help you to solve Pancake sorting problem. At the end of the conversation I'll draw you an image for better intuition. Let’s go? 😎