We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16ac06f commit 5f7c2c6Copy full SHA for 5f7c2c6
src/main/java/g3001_3100/s3003_maximize_the_number_of_partitions_after_operations/Solution.java
@@ -30,7 +30,6 @@ public int maxPartitionsAfterOperations(String s, int k) {
30
ansr[i] = ans;
31
usedr[i] = used;
32
}
33
-
34
int ansl = 0;
35
ans = ansr[0];
36
int l = 0;
@@ -56,7 +55,6 @@ public int maxPartitionsAfterOperations(String s, int k) {
56
55
57
r++;
58
59
60
if (cntUsed == k) {
61
if (last - l > Integer.bitCount(usedBeforeLast)) {
62
ans = Math.max(ans, ansl + 1 + ansr[last]);
@@ -85,7 +83,6 @@ public int maxPartitionsAfterOperations(String s, int k) {
85
83
l = r;
86
84
ansl++;
87
88
89
return ans;
90
91
0 commit comments