We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d4f526 commit 959f67eCopy full SHA for 959f67e
1 file changed
LeetCodePrj/Java/leetcode/easy/page3/RepeatedSubstringPattern.java
@@ -1,5 +1,7 @@
1
package leetcode.easy.page3;
2
3
public class RepeatedSubstringPattern {
4
-
+ public boolean repeatedSubstringPattern(String s) {
5
+ return (s + s).substring(1, 2 * s.length() - 1).contains(s);
6
+ }
7
}
0 commit comments