Live Batches
Masterclasses
Menu
Free Courses
Account
Login / Sign Up
Problem Submissions Solution

Strings Rotations

Difficulty: Medium

Acceptance: 43.83%

Points: 30.00

You are given two strings, **s1** and **s2**, of equal lengths. Your task is to determine whether **s2** can be obtained by rotating the characters of **s1**. Note: The characters in the strings are in **lowercase**.

Topics

Companies

Articles

Examples:

Expected Time Complexity: O(n)

Expected Space Complexity: O(n)

Constraints:
  • 1 <= s1.size(), s2.size() <= 10^5
  • The characters in the strings are in lowercase.
Companies:
Adobe Oracle
Topics:
String
Locked Content
Access Restricted: Please Login to access the code editor and test cases.