Determine String Rotation in Computer Science