String Rotation solution