Pancake sorting
Given an unsorted array, the task is to sort the given array. You are allowed to do only following operation on array. flip(arr, i): Reverse array from 0 to i Examples: Input: arr[] = { 23, 10, 20, 11, 12, 6, 7 }Output: { 6, 7, 10, 11, 12, 20, 23} Input: arr[] = { 0, 1, 1, 0, 0 }Output: { 0, 0, 0, 1, 1 } Approach: Unlike a traditional sorting algor