We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa6055b commit 6b5185bCopy full SHA for 6b5185b
LeetCode/921-930/926. 将字符串翻转到单调递增(中等).md
@@ -57,8 +57,8 @@ class Solution {
57
public int minFlipsMonoIncr(String s) {
58
char[] cs = s.toCharArray();
59
int n = cs.length, ans = 0;
60
- int[] g = new int[n + 1];
61
- Arrays.fill(g, 0x3f3f3f3f);
+ int[] g = new int[n + 10];
+ Arrays.fill(g, n + 10);
62
for (int i = 0; i < n; i++) {
63
int t = s.charAt(i) - '0';
64
int l = 1, r = i + 1;
0 commit comments