Company: Amazon_29Aug
Difficulty: medium
Permutation Sorter Problem Description Amazon engineers are testing a new tool, the Permutation Sorter, built to reorder sequences using limited operations. Given a permutation of integers, the objective is to sort the permutation using only two specific operations: Reverse the entire permutation. Transfer the first element of the permutation to the last position, i.e., change arr[0], arr[1], ..., arr[n-1] to arr[1], arr[2], ..., arr[n-1], arr[0] . Formally, given a permutation arr of size n , determine the minimum number of operations needed to sort the given permutation in increasing order. The permutation provided is guaranteed to be sorted using only these two operations. Note: A permutation of length n is a sequence of integers from 1 to n containing each number exactly once. Function Description Complete the function findMinimumOperations in the editor below. findMinimumOperations has the following parameter: int arr[n] : A permutation of length n Returns: int : minimum number of