python simple solution,1 line


  • 0
    W
    class Solution(object):
        def checkRecord(self, s):
            """
            :type s: str
            :rtype: bool
            """
            return not (s.count('LLL')>0 or s.count('A')>1)
    

Log in to reply
 

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