Java 1-line code


  • 0
    public class Solution {
        public boolean checkRecord(String s) {
            return (s.indexOf("LLL") == -1 && (s.indexOf("A") == s.lastIndexOf("A")));
        }
    }
    

Log in to reply
 

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