I don’t think they mean the test cases you have in the notebook (albeit, it won’t hurt to check if they really work) but the hidden test cases, known only to those who did this assignment.

Reset your notebook (clear all the outputs) and rerun all cells to make sure the tests really work. Perhaps your implementation changed and you didn’t rerun the tests.

Thanks, Sebgolos
But I want to know - are my test cases correct?
This means that is this the correct output when we rotate array n-1 times -
{‘nums’: [3, 5, 7, 1]}
Expected Output:
3
and the second case - when we rotate n times
{‘nums’: [1, 3, 5, 7, 9]}
Expected Output:
0

If the middle number is the smallest number in the list e.g. [5,6,9,1,2,3,4], it will be less than the right most number in the list so according to our algorithm, the smallest number lies to the left of the current number and discards the current number and all the numbers to the right of it. So we will never be finding the smallest number as it was neglected in the first iteration itself. Is it not wrong?

in your example, the low=0 and high = len(nums)-1 = 6, so low+high // 2 = 3. This means the middle is at the index 3 with the element 1. Since as condition we have if value at [mid] less than [mid-1] which in this case it is. 1 < 9. We have found the answer which is [mid] so 3 also means 3 rotations which is the correct answer. If I understood your question.