Conflict in the Test Case Output :

Problem Type : Rotated Lists.
There is no way to figure out in case of a sorted list, that if it was rotated N times or it wasn’t rotated at all. The tests require the output to be 0 in case of unrotated list, but N in case where it is rotated N times. There is no way to figure out in case of a sorted list. Hence, it fails to satisfy one of these test cases.

TEST CASE #2

Input:
{‘nums’: [1, 2, 3, 4, 5]}

Expected Output:
0

Actual Output:
0

Execution Time:
0.003 ms

Test Result:
PASSED

TEST CASE #5

Input:
{‘nums’: [1, 2, 3, 4, 5, 6, 7]}

Expected Output:
7

Actual Output:
0

Execution Time:
0.004 ms

Test Result:
FAILED

Hey @yucifer
Actually for a list which is rotated N times times the output should be 0 as the question states that you have to find the minimum number of times a list has been rotated…Just read the question carefully as it gives all the information you are going to be required…

Here is the question…

@vinaypratapsingh609
Yes my output shows 0 only. As you can see my output passes the #Test2. But if you see the #Test5 you will get a sense of where the problem arises. It expects N instead of 0.

Actually the expected output of 7 has been set by you…which is wrong
It is showing that test failed as it compares the result with expected output but in your case the actual ouput is correct and the expected output is wrong so it shows FAILED

Just go to the cells where you have made the testcases and correct your expected output because expected output should not be 7 it should be 0

Thank you !! for pointing that out.