Rotate String

Medium · rating 1300 · Strings

Read two strings, one per line. Print YES if the first is a rotation of the second (shift its characters cyclically), else NO.

For abcde and cdeab print YES.

Related problems

Open Rotate String in Code Arena →