@@ -0,0 +1,939 @@
+package com.dw.leetcode;%0D%0A%0D%0Aimport java.util.HashMap;%0D%0A%0D%0A//@example: Leetcode - 551. Student_Attendance_Record_I - https://leetcode.com/problems/student-attendance-record-i/#/description%0D%0Apublic class Student_Attendance_Record_I_551 %7B%0D%0A%09%0D%0A%09public static boolean checkRecord(String s) %7B%0D%0A        %0D%0A        int a = 0,l=0;%0D%0A        %0D%0A        for(int i=0;i%3Cs.length();i++) %7B%0D%0A        %09%0D%0A        %09char c = s.charAt(i);%0D%0A        %09%0D%0A        %09if(c == 'A')%7B%0D%0A        %09%09a++;%0D%0A        %09%09l=0;%0D%0A        %09%7D%0D%0A        %09%0D%0A        %09if(a %3E= 2) return false;%0D%0A        %09%0D%0A        %09if(c == 'L')%0D%0A        %09%7B%0D%0A        %09%09l++;%0D%0A        %09%09%0D%0A        %09%7D%0D%0A        %09%0D%0A        %09if(l %3E= 3) return false;%0D%0A        %09%0D%0A        %09if( c!='A' && c!='L') %7B%0D%0A        %09%09l=0;%0D%0A        %09%7D%0D%0A        %7D%0D%0A        %0D%0A        return true;%0D%0A    %7D%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09// TODO Auto-generated method stub%0D%0A%0D%0A%09%09System.out.println(checkRecord(%22PPLALL%22));%0D%0A%09%09%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

add to git