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. Return true or false.
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:
Contains 2 A's, but the rule requires fewer than 2 (i.e., at most 1).
Constraints
- •
1 ≤ s.length ≤ 1000