Consider we are given with an array of size n and contains elements from 0 to n-1 (all the elements are distinct), we need to find minimum number of operations required to make array incremental.
here operation is defined as : choose any two index i and j and reverse subarray from i to j
We need to determine minimum number of reverse operations required to make array incremental.
Can Someone please explain like, how i can reach this problem as i am tired of it and unable to comeup with any answer.
-> I read article on Pancake Sorting to make array incremental but it does not return minimum number of operation. -> then i came up with another article which is " Hannenhalli-Pevzner Algorithm" but unable to understand it.
any help would be appretiated thanks.