Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Hsinha11/Leetcode-solutions
/ rotateString
Method
rotateString
812-rotate-string/rotate-string.cpp:3–5 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
class Solution {
2
public:
3
bool rotateString(string s, string goal) {
4
return (s.size() == goal.size()) && ((s + s).find(goal) != string::npos);
5
}
6
};
Callers
nothing calls this directly
Calls
1
find
Method · 0.45
Tested by
no test coverage detected