I need to solve the following problem:
Give a linear-time algorithm to determine if a text T is a cyclic rotation of another string T'. For example,
arc
andcar
are cyclic rotations of each other.
I have no idea where to start. How can I solve this problem?