# Confusing definition in assignment

From the assignment text a rotation is defined as taking the last element from a list and put that as 1st element followed by the remainder of the list. Then to my conclusion the result of a given testcase should the 7 (not 3)

``````test = {
'input': {
'nums': [19, 25, 29, 3, 5, 6, 7, 9, 11, 14]
},
'output': 3
}
``````

Checking[0] [19, 25, 29, 3, 5, 6, 7, 9, 11, 14]
Checking[1] [14, 19, 25, 29, 3, 5, 6, 7, 9, 11]
Checking[2] [11, 14, 19, 25, 29, 3, 5, 6, 7, 9]
Checking[3] [9, 11, 14, 19, 25, 29, 3, 5, 6, 7]
Checking[4] [7, 9, 11, 14, 19, 25, 29, 3, 5, 6]
Checking[5] [6, 7, 9, 11, 14, 19, 25, 29, 3, 5]
Checking[6] [5, 6, 7, 9, 11, 14, 19, 25, 29, 3]
Checking[7] [3, 5, 6, 7, 9, 11, 14, 19, 25, 29]

(7, False)

The list before applying rotations is sorted in an ascending order.

Meaning the `nums` is actually already rotated several times.

The question isn’t how many times you have to rotate the list, to get back to sorted version, but how many times the initially sorted version has been rotated.

checking[0] [19,25,29,3,5,6,7,9,11,14]
checkng[1] [25,29,3,5,6,7,9,11,14,19]
checking[2] [29,3,5,6,7,9,11,14,19,25]
checking[3] [3,5,6,7,9,11,14,19,25,29]

number of rotations is 3 which is the index of element “3” in this array.

Makes perfectly sense!
Thanks