python 1 line


  • 0
    class Solution(object):
        def checkRecord(self, s):
            """
            :type s: str
            :rtype: bool
            """
            return re.match(r'^(.*)LLL(.*)$',s)==None and re.match(r'(.*)[A]+(.*)[A]+(.*)',s)==None
    

Log in to reply
 

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