Solution 1 - Count Absences + Late Streak
Invalid if absences ≥ 2 or there is any "LLL" substring.
""" 0551.1 - Student Attendance Record I - Solution 1 - Count Absences + Late Streak """
class Solution:
def checkRecord(self, s: str) -> bool:
return s.count("A") < 2 and "LLL" not in s
if __name__ == "__main__":
print(Solution().checkRecord("PPALLP"))