This is a verified interview question from Natwest. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "DSA-1 Natwest - IIT, Kharagpur" covers key patterns like Other.
"**Mode:** On-Campus **Exam Pattern:** 12 SQL Que, 2 DSA Que, reasoning and behavioral question **OA Date:** 2026-10-26 ## DSA-1 ## Right Rotation Check (`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`. ### Function Signature ``` int isSameReflection(string word1, string word2); ```"
Join thousands of developers practicing for Natwest.