滑动窗口
- 滑动窗口算法在双指针的基础上发展而来,在双指针之间构造出固定或变长的一段作为窗口,不断移动窗口寻找满足条件的最优解。
- 算法参考:
https://www.cnblogs.com/huansky/p/13488234.html
https://leetcode.cn/problems/minimum-window-substring/solution/by-flix-1kac/
https://leetcode.cn/problems/find-all-anagrams-in-a-string/solution/hua-dong-chuang-kou-tong-yong-si-xiang-jie-jue-zi-/
https://leetcode.cn/problems/shortest-supersequence-lcci/solution/by-flix-difn/ - 通用模板:待整理
- 题目实战:
1208. 尽可能使字符串相等
1456. 定长子串中元音的最大数目
76. 最小覆盖子串
567. 字符串的排列
438. 找到字符串中所有字母异位词
3. 无重复字符的最长子串
239. 滑动窗口最大值