Open joaogomes44033 opened 7 years ago
In the stringRotation solution you do nothing with rotation variable.
boolean stringRotation (String s1, String s2) { if (s1.length() == s2.length() && s1.length() > 0) { StringBuilder rotation = new StringBuilder(); rotation = s1+s1; return s2.isSubstring(s1); } return false; }
It should be:
return s2.isSubstring(rotation);
In the stringRotation solution you do nothing with rotation variable.
boolean stringRotation (String s1, String s2) { if (s1.length() == s2.length() && s1.length() > 0) { StringBuilder rotation = new StringBuilder(); rotation = s1+s1; return s2.isSubstring(s1); } return false; }
It should be:
return s2.isSubstring(rotation);