Find One string inside other

Learnings

Intuition

string temp = s + s;
return (temp.find(goal) != string::npos);

Here the time complexity of npos find is n * m 
Where n and m are lenght of strings

https://leetcode.com/problems/rotate-string/description/

Last updated