1004. 最大连续1的个数 III #228
Replies: 1 comment
-
过于巧妙了,不太好理解 if zero_count > k: ,表示窗口长度只递增,那些比当前 [left,right] 长度小的就不要了 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1004. 最大连续1的个数 III
--- 1004. 最大连续1的个数 III 标签:数组、二分查找、前缀和、滑动窗口 难度:中等 题目链接 1004. 最大连续1的个数 III - 力扣 题目大意 描述:给定一个由 0、1 组成的数组 nums,再给定一个整数 k。最多可以将 k 个值从 0 变到 1。 要求:返回仅包含 1 的最长连续子数组的长度。 说明: 1≤nums.lengt...
https://algo.itcharge.cn/solutions/1000-1099/max-consecutive-ones-iii/
Beta Was this translation helpful? Give feedback.
All reactions