Mode: On-Campus Exam Pattern: 12 SQL Que, 2 DSA Que, reasoning and behavioral question OA Date: 2026-10-26
isSameReflection)Problem Statement
A word is written in a circle and read clockwise from any starting letter, producing all its right rotations.
For example, the right rotations of "sample" include "plesam" and "plesam"? Actually, starting from p gives "plesam".
Given two strings, word1 and word2 (containing only lowercase letters a-z), print 1 if word1 is a right rotation of word2; otherwise, print -1.
int isSameReflection(string word1, string word2);