Skip to content

Commit 959f67e

Browse files
committed
Repeated Substring Pattern: AC
1 parent 1d4f526 commit 959f67e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package leetcode.easy.page3;
22

33
public class RepeatedSubstringPattern {
4-
4+
public boolean repeatedSubstringPattern(String s) {
5+
return (s + s).substring(1, 2 * s.length() - 1).contains(s);
6+
}
57
}

0 commit comments

Comments
 (0)