you give permutation consist n number 1 2 n permutation array element 1 n occur exactly onceYou perform follow operation choose subarray contiguous subsegment rearrange element way want but operation apply arrayfor example 2 1 4 5 3 want apply operation subarray a2 4 subarray contain element 2nd 4th operation array 2 5 1 4 3 example 2 1 5 4 3your task calculate minimum number operation describe sort permutation ascending order