1 Random Problem
Diffstat:
2 files changed, 11 insertions(+), 0 deletions(-)
@@ -0,0 +1,10 @@
class Solution {
public:
int flipLights(const int n, const int presses) const {
if (n == 0 || presses == 0) return 1;
if (n == 1) return 2;
if (n == 2) return presses == 1 ? 3 : 4;
if (presses == 1) return 4;
return presses == 2 ? 7 : 8;
}
};
@@ -452,6 +452,7 @@
for solving problems.
| 0667 | Medium | [Beautiful Arrangement II](Problems/0667.cpp) |
| 0669 | Medium | [Trim a Binary Search Tree](Problems/0669.cpp) |
| 0671 | Easy | [Second Minimum Node In a Binary Tree](Problems/0671.cpp) |
| 0672 | Medium | [Bulb Switcher II](Problems/0672.cpp) |
| 0673 | Medium | [Number of Longest Increasing Subsequence](Problems/0673.cpp) |
| 0676 | Medium | [Implement Magic Dictionary](Problems/0676.cpp) |
| 0677 | Medium | [Map Sum Pairs](Problems/0677.cpp) |