NEED HELP : Minimum number of reverse operations to make array incremental

Revision en2, by Vansh_Rana, 2024-08-03 16:29:34

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.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Vansh_Rana 2024-08-03 16:29:34 31
en1 English Vansh_Rana 2024-08-03 16:28:01 868 Initial revision (published)