readings, return True if it can be such a rotation of a list sorted in non-decreasing order, and False otherwise. Readings may repeat.readings=[6, 8, 8, 2, 3] → True
The original order was [2, 3, 6, 8, 8]; its beginning was simply moved to the end.
readings=[5, 1, 4, 2] → False
Values drop both after 5 and after 4, which no shift of a sorted list can produce.
readings=[1, 2, 9] → True
The list is already sorted, which is a shift by zero positions.
readings=[6, 8, 8, 2, 3]
True
Run checks the first 3 tests in your browser. Submit checks all 137 tests on the server, hidden ones included.