What We have to return when the list is not rotated?

we have to return what 0 or -1?

I think 0 should be the best output because it represents that there is no need to rotate the list.

Whereas it’s not clear for the output -1.

1 Like

But in the case of generic function ,it return -1 . So how should we deal with that, one possible solution can be take the output of generic in variable and convert accordingly

Well, it is not showing any error for me.