Skip to content

Commit 858bbc6

Browse files
refactor 672
1 parent 5faaef3 commit 858bbc6

File tree

1 file changed

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

1 file changed

+0
-32
lines changed

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

-32
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,6 @@
22

33
import com.fishercoder.common.utils.CommonUtils;
44

5-
/**
6-
* 672. Bulb Switcher II
7-
* There is a room with n lights which are turned on initially and 4 buttons on the wall.
8-
* After performing exactly m unknown operations towards buttons,
9-
* you need to return how many different kinds of status of the n lights could be.
10-
* Suppose n lights are labeled as number [1, 2, 3 ..., n], function of these 4 buttons are given below:
11-
12-
Flip all the lights.
13-
Flip lights with even numbers.
14-
Flip lights with odd numbers.
15-
Flip lights with (3k + 1) numbers, k = 0, 1, 2, ...
16-
17-
Example 1:
18-
19-
Input: n = 1, m = 1.
20-
Output: 2
21-
Explanation: Status can be: [on], [off]
22-
23-
Example 2:
24-
25-
Input: n = 2, m = 1.
26-
Output: 3
27-
Explanation: Status can be: [on, off], [off, on], [off, off]
28-
29-
Example 3:
30-
31-
Input: n = 3, m = 1.
32-
Output: 4
33-
Explanation: Status can be: [off, on, off], [on, off, on], [off, off, off], [off, on, on].
34-
35-
Note: n and m both fit in range [0, 1000].
36-
*/
375
public class _672 {
386
public static class Solution1 {
397
public int flipLights(int n, int m) {

0 commit comments

Comments
 (0)