(s)
return ChenFoxLyndonBreakpoints(s).next() == len(s)
Is the given sequence a Lyndon word?
Is the given sequence a Lyndon word?
Is the given sequence a Lyndon word?
def isLyndonWord(s):
    """Is the given sequence a Lyndon word?"""
    if len(s) == 0:
        return True
    return ChenFoxLyndonBreakpoints(s).next() == len(s)
def isLyndonWord ( s ) : if len ( s ) == 0 : return True return ChenFoxLyndonBreakpoints ( s ) . next ( ) == len ( s )