Assignment 1 - Bonus #1

I am in doubt about this. The default answer must be 0 zero not -1, in my opinion.
Please enlighten me if I’m wrong

Many Thankss

i tried with simple else if statement. if return in -1 then the answer is 0 else the answer is returned number

nice, after coming up with a -1 answer just replace it with 0.
thank you!!!

I don’t think it’s wrong to have -1 as the answer as we return the position at which the rotation happened so returning 0 means rotation happened at position 0.
But in this case, rotation didn’t happen so returning -1 signifies no rotation happened.

But practically, returning 0 is also right.

It should be 0 right,it can be -1.If rotation doesnt happen means its 0 rotation.But better understanding we can write 0 only.