Rotate String at Google
Easy65.1% acceptance
This problem has 37.5% frequency at Google.
Problem Description
Given two strings `s` and `goal`, return `true` _if and only if_ `s` _can become_ `goal` _after some number of**shifts** on_ `s`. A **shift** on `s` consists of moving the leftmost character of `s` to the rightmost position. * For example, if `s = "abcde"`, then it will be `"bcdea"` after one sh...
Read full problem and hintsTopics
Also asked at 12 companies
More Google Questions
Longest Substring Without Repeating CharactersMediumLongest Common PrefixEasyMerge Strings AlternatelyEasyLongest Palindromic SubstringMediumValid ParenthesesEasy
View all Google questions