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
Links
Last updated
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
Last updated