<gouthampradhan>string_StudentAttendanceRecordI_1.java
public boolean checkRecord(String s) {
    int count = 0;
    for (int c : s.toCharArray()) {
      if (c == 'A') {
        count++;
      }
      if (count > 1) return false;
    }
    if (s.contains("LLL")) return false;
    return true;
  }
public boolean var_0 ( String var_2 ) {
  int var_4 = 0 ;
  for ( int var_6 : var_2 . toCharArray ( ) ) {
    if ( var_6 == 'A' ) {
      var_4 ++ ;
    }
    if ( var_4 > 1 ) return false ;
  }
  if ( var_2 . contains ( "LLL" ) ) return false ;
  return true ;
}
