Easy to understanf soltion do look!


#1

int Solution::solve(int A, int B, int C)
{
int pos = C + A%B -1;
if(pos> B)
{
return pos%B;
}
else
{
if(pos==0)
{
return B;
}
else
{
return pos;
}
}
}