C++ 1 liner


  • 0
    D
    bool checkRecord(string s) {
            return (s.find("A")==string::npos or (s.find("A")==s.rfind(("A")))) and s.find("LLL")==string::npos;
        }
    

Log in to reply
 

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