Available question text
Count the number of length-n strings over {A,P,L} with fewer than 2 'A's and no three consecutive 'L's, returning the result mod 1e9+7. The core challenge is to compute this efficiently for n up to 1e5 using DP or linear-recurrence/matrix-exponentiation techniques.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 552. Student Attendance Record II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source