滑动窗口【基础算法精讲 03】

47.5万
624
2022-11-09 18:01:47
6721
5662
5310
946
本期视频介绍了三类典型的滑动窗口题目:最短/最长/方案数,代表题目分别为(包含其它语言代码): 209. 长度最小的子数组 https://leetcode.cn/problems/minimum-size-subarray-sum/solution/biao-ti-xia-biao-zong-suan-cuo-qing-kan-k81nh/ 3. 无重复字符的最长子串 https://leetcode.cn/problems/longest-substring-without-repeating-characters/solution/xia-biao-zong-suan-cuo-qing-kan-zhe-by-e-iaks/ 713. 乘积小于 K 的子数组 https://leetcode.cn/problems/subarray-product-less-than-k/solution/xia-biao-zong-suan-cuo-qing-kan-zhe-by-e-jebq/ 课后作业: 3090. 每个字符最多出现两次的最长子字符串 https://leetcode.cn/problems/maximum-length-substring-with-two-occurrences/ 2958. 最多 K 个重复元素的最长子数组 https://leetcode.cn/problems/length-of-longest-subarray-with-at-most-k-frequency/ 2730. 找到最长的半重复子字符串 https://leetcode.cn/problems/find-the-longest-semi-repetitive-substring/ 1004. 最大连续 1 的个数 III https://leetcode.cn/problems/max-consecutive-ones-iii/ 2962. 统计最大元素出现至少 K 次的子数组 https://leetcode.cn/problems/count-subarrays-where-max-element-appears-at-least-k-times/ 2302. 统计得分小于 K 的子数组数目 https://leetcode.cn/problems/count-subarrays-with-score-less-than-k/ 1658. 将 x 减到 0 的最小操作数 https://leetcode.cn/problems/minimum-operations-to-reduce-x-to-zero/ 3795. 不同元素和至少为 K 的最短子数组长度 https://leetcode.cn/problems/minimum-subarray-length-with-distinct-sum-at-least-k/ 76. 最小覆盖子串 https://leetcode.cn/problems/minimum-window-substring/ 我的题解在题目的题解区中。 【题单】滑动窗口: https://leetcode.cn/circle/discuss/0viNMK/
带你理解算法的本质。题单:leetcode.cn/circle/discuss/RvFUtj
自动连播
637.7万播放
简介
01 相向双指针 两数之和 三数之和 167 15
13:19
02 相向双指针 接雨水 前后缀分解 11 42
12:35
03 滑动窗口 最短 最长 方案数 209 713 3
14:57
04 二分查找 红蓝染色法 34
12:36
05 二分查找 搜索旋转排序数组 162 153 33
06:17
06 反转链表 K个一组翻转 206 92 25
07:13
07 快慢指针 环形链表 重排链表 876 141 142 143
07:35
08 前后指针 链表删除 链表去重 237 19 83 82
06:48
09 二叉树 递归 数学归纳法 栈 104
07:43
10 二叉树 相同 对称 平衡 右视图 100 101 110 199
07:16
11 二叉搜索树 前序 中序 后序 98
08:34
12 二叉树 最近公共祖先 236 235
06:19
13 二叉树 层序遍历 BFS 队列 102 103 513
09:14
14 回溯 子集型 分割回文串 17 78 131
12:22
15 回溯 组合型 剪枝 77 216 22
14:37
16 回溯 排列型 N皇后 46 51
18:16
17 动态规划 从记忆化搜索到递推 打家劫舍 198
08:09
18 0-1背包 完全背包 目标和 零钱兑换 494 322
15:57
19 线性DP 最长公共子序列 编辑距离 1143 72
10:50
20 线性DP 最长递增子序列 300
12:09
21 状态机DP 买卖股票系列 122 309 188
14:48
22 区间DP 最长回文子序列 最优三角剖分 516 1039
09:33
23 树形DP① 树的直径 543 124 2246
10:18
24 树形DP② 打家劫舍III 树上最大独立集 337
06:24
25 树形DP③ 监控二叉树 树上最小支配集 968
12:22
26 单调栈 每日温度 接雨水 739 42
12:28
27 单调队列 滑动窗口最大值 239
07:11
客服
顶部
赛事库 课堂 2021拜年纪