Quote:def get_reversals_to_sort(self, a)
You need to sort an array of integers by repeatedly reversing
the order of the first several elements of it.
For example, to sort [11,14,12,13], you need to reverse the order of the
first two (2)
elements and get [14,11,12,13], then reverse the order of the first four (4)
and get [13,12,11,14] and then reverse the order of the first three (3)
The method should return array of integers corresponding to the required
For the previous example, given an array [11,14,12,13]
the method should return a array with integers [2,4,3].
:param a: list of numbers
:returns: list of numbers
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)