Did they cheat?
https://www.hackerrank.com/contests/codenection-2021-open-category-preliminary/challenges/did-they-cheat
Question
The students of Dr. Kyle have submitted a unique string that Dr. Kyle gave them for homework. He is checking the strings of student A and student B which are denoted as A and B. Dr. Kyle wants to find out if they copied each other's work. If the string A can be transformed into string B with rotations, it'll be obvious to Dr. Kyle that they have cheated.
Input Format
A B
Constraints
Output Format
Output Yes
if they cheated, No
if they did not.
Sample Inputs:
Last updated