Description
You are given a string s representing an attendance record. A student is eligible for an attendance award if they were absent fewer than 2 days total and never late 3 or more consecutive days.
Examples
Input:
s = "PPALLP"Output:
trueExplanation:
Only 1 A, no 3 L's.
Input:
s = "PPALLL"Output:
falseExplanation:
Contains 3 consecutive 'L's (late), which disqualifies the student from the attendance award.
Input:
s = "ALLAPPP"Output:
falseExplanation:
This input has 2 A's which meets the limit, but it is still false because strictly less than 2 A's (meaning at most 1 A) is required to be eligible for the award.
Constraints
- •
1 ≤ s.length ≤ 1000