NeetCode #707LC-552Hard1-D Dynamic Programming
← Back to All Problems

#707 · #552 · Student Attendance Record II(学生出勤记录 II)

📌 Problem Statement & Constraints

Count the number of attendance records of length n (each day is A absent, L late, or P present) that contain at most one A and no three consecutive L, modulo 10^9 + 7. Constraints: 1 <= n <= 10^5.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!