String Rotation Check Problem

String Rotation Check Problem — ExecCode School DSA Practice

Solve the String Rotation Check problem on ExecCode. Free online school DSA practice in Strings - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Given two strings, determine if the second string is a rotated version of the first string. Your task is to solve String Rotation Check. Print 'Yes' if it is, and 'No' otherwise.

Examples

Input abcde cdeab; Output Yes. Input abcde abcde; Output Yes

Constraints

1<=len<=10^4

Practice String Rotation Check free on ExecCode. Browse DSA problems, topic map, and placement guides.