Skip to content

Commit 31af401

Browse files
refactor 552
1 parent da290d1 commit 31af401

File tree

1 file changed

+0
-26
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-26
lines changed

src/main/java/com/fishercoder/solutions/_552.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 552. Student Attendance Record II
5-
*
6-
* Given a positive integer n, return the number of all possible attendance records with length n,
7-
* which will be regarded as rewardable. The answer may be very large, return it after mod 109 + 7.
8-
9-
A student attendance record is a string that only contains the following three characters:
10-
11-
'A' : Absent.
12-
'L' : Late.
13-
'P' : Present.
14-
15-
A record is regarded as rewardable if it doesn't contain more than one 'A' (absent) or more than two continuous 'L' (late).
16-
17-
Example 1:
18-
19-
Input: n = 2
20-
Output: 8
21-
22-
Explanation:
23-
There are 8 records with length 2 will be regarded as rewardable:
24-
"PP" , "AP", "PA", "LP", "PL", "AL", "LA", "LL"
25-
Only "AA" won't be regarded as rewardable owing to more than one absent times.
26-
27-
Note: The value of n won't exceed 100,000.
28-
*/
293
public class _552 {
304

315
public static class Solution1 {

0 commit comments

Comments
 (0)