1 line Java Solution


  • 0
    J
    public boolean repeatedSubstringPattern(String str) {
        return ((str+str).indexOf(str,1))<str.length();
    }

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.