Assignment 1 - Test5

If the list is already sorted and no need to be rotated. Why is the expected result is equal to the length of the list which is 8?
If there is no need to rotate the list, I think I should be equal to zero.

Thank you

image

1 Like

I think it’s a mistake done in defining the test case,
It should be 0 or -1, depending on which you think is right for the no rotation.

1 Like

Thank you, same thoughts bro. I hope they can improve it. The Jovian is very helpful for self-learners.