1658. 将 x 减到 0 的最小操作数 https://leetcode.cn/problems/minimum-operations-to-reduce-x-to-zero
1658. Minimum Operations to Reduce X to Zero https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero
713. 乘积小于K的子数组 https://leetcode.cn/problems/subarray-product-less-than-k
713. Subarray Product Less Than K https://leetcode.com/problems/subarray-product-less-than-k
1004. 最大连续1的个数 III https://leetcode.cn/problems/max-consecutive-ones-iii
1004. Max Consecutive Ones III https://leetcode.com/problems/max-consecutive-ones-iii
340. 至多包含 K 个不同字符的最长子串 https://leetcode.cn/problems/longest-substring-with-at-most-k-distinct-characters
340. Longest Substring with At Most K Distinct Characters https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters
424. 替换后的最长重复字符 https://leetcode.cn/problems/longest-repeating-character-replacement
424. Longest Repeating Character Replacement https://leetcode.com/problems/longest-repeating-character-replacement
219. 存在重复元素 II https://leetcode.cn/problems/contains-duplicate-ii
219. Contains Duplicate II https://leetcode.com/problems/contains-duplicate-ii
220. 存在重复元素 III https://leetcode.cn/problems/contains-duplicate-iii
220. Contains Duplicate III https://leetcode.com/problems/contains-duplicate-iii
209. 长度最小的子数组 https://leetcode.cn/problems/minimum-size-subarray-sum
209. Minimum Size Subarray Sum https://leetcode.com/problems/minimum-size-subarray-sum
395. 至少有 K 个重复字符的最长子串 https://leetcode.cn/problems/longest-substring-with-at-least-k-repeating-characters
395. Longest Substring with At Least K Repeating Characters https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters
滑动窗口的应用非常广泛,但我们的框架可以套用所有需要滑动窗口算法的题目中,下面就来举例一些最经典的题目,我会反复强调 滑动窗口算法框架 中的思考方式,以强化你对这个算法的理解和记忆。
loading...