Given two strings
s
andgoal
, returntrue
if and only ifs
can becomegoal
after some number of shifts ons
.A shift on
s
consists of moving the leftmost character ofs
to the rightmost position.
- For example, if
s = "abcde"
, then it will be"bcdea"
after one shift.
c++
1 |
|