Hackerrank Larry's Array Solution
Larry has been given a permutation of a sequence of natural numbers incrementing from as an array. He must determine whether the array can be sorted using the following operation any number of times:
* Choose any consecutive indices and rotate their elements in such a way that .
For example, if