absentCount
to 0 and consecutiveLate
to 0.s
.
a. If the current character is 'A'
, increment absentCount
.
b. If absentCount
is greater than 1, return false
.
c. If the current character is 'L'
, increment consecutiveLate
.
d. If the current character is not 'L'
, reset consecutiveLate
to 0.
e. If consecutiveLate
reaches 3, return false
.false
, return true
.