2021-07-01
leetcode 76 滑动窗口法
题目在这里 leetcode 76
给你一个字符串 s 、一个字符串 t 。返回 s 中涵盖 t 所有字符的最小子串。如果 s 中不存在涵盖 t 所有字符的子串,则返回空字符串 “” 。
示例1:
输入:s = “ADOBECODEBANC”, t = “ABC”
输出:“BANC”
示例2:
输入:s = “a”, t = “a”
输出:“a”
题解:
class Solution {
public:
string minWindow(string s, str
原创
2021-07-01 12:10:31 ·
93 阅读 ·
0 评论