Cyclic shift

we can also find the lexicographically smallest character within the range [l,r] ,and then concatenate the left part at the end to find the minimal cyclic shift. Then, we will have to deal with characters instead.

will this result into a W.A.?

Uh… but what question/problem does this pertain to?

See this editorial link this is very helpful.

//