Dynamic Programming Solution For Student Attendance Records
Dynamic Programming solution for Student Attendance Record II: count valid records with <2 absences & no 3+ late days. Modular arithmetic handles large numbers.
552. Student Attendance Record II
Difficulty: Hard
Topics: Dynamic Programming
An attendance record for a student can be represented as a string where each character signifies whether the student was absent, late, or present on that day. The record only contains the following three characters:
'A': Absent.
'L': Late.
'P': Present.
Any student is eligible for an attendance award if they meet both of the following criteria:
The student was absent ('A') for strictly fewer than 2 days total.
The student was never late ('L') for 3 or more consecutive days.
Given an integer n, return the number...
            