@@ -0,0 +1,701 @@
+package leetcode;%0A%0A/**%0A * https://leetcode.com/problems/student-attendance-record-i/%0A */%0Apublic class Problem551 %7B%0A    public boolean checkRecord(String s) %7B%0A        int countA = 0;%0A        int countL = 0;%0A        char c = ' ';%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A            if (s.charAt(i) == 'A') %7B%0A                countA++;%0A            %7D else if (s.charAt(i) == 'L') %7B%0A                if (c == s.charAt(i)) %7B%0A                    countL++;%0A                %7D else %7B%0A                    countL = 1;%0A                %7D%0A            %7D%0A            c = s.charAt(i);%0A            if (countA %3E= 2 %7C%7C countL %3E= 3) %7B%0A                return false;%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%7D%0A

Solve problem 551