Company: sprinklr_17july
Difficulty: medium
Employee Of The Year Problem Description A mid-size logistics firm runs an annual staff-recognition gala, and this season they are adding an "Employee Of The Year" category. To qualify for that nomination, a staff member's attendance over the last N days must satisfy both of these rules: The employee should not have been absent for more than or equal to 2 days in total. The employee should not have been late to work for 3 or more consecutive days . An attendance record of an employee for N days can be represented as a string of length N, where each character signifies whether the employee was absent, late, or present on that day. The record only contains the following three characters: A: Absent L: Late P: Present Given an integer N (number of days), return the number of possible attendance records of length N that make an employee eligible for the award nomination. The answer may be very large, so return it modulo 10 9 + 7. You'll be given a single integer N. Examples Example 1: Input