In the editorial it is written like below:
With respect to a single string, the total number of bits rotated after N operations is 1+2+3+….+N which is (N*(N+1))/2.
We get back the original string only when the total number of rotated bits is a multiple of the length of the string S(LEN).
This can be done in O(N) time for each string (Summation of length of all strings is <= 1e6), by finding all (N (N+1))/2 where N starts from 1 and goes upto (2 LEN-1).
I understood the (N*(N+1))/2 logic but could not understand how it relates to 2* LEN - 1? Why are we checking no of rotation to be a multiple of LEN till 2*LEN -1?