给出两个字符串 s 和 t,要求在 s 中找出最短的包含 t 中所有字符的连续子串。
题目解法:利用哈希表进行求解,并利用Hashmap的getOrDefault()函数,对hashmap
中的key值进行统计,并记得要考虑T模板中有多个重复值的情况。
public class Solution {
public String minWindow (String S, String T) {
// write code here
HashMap need=new HashMap<>();
HashMap window=new HashMap<>();
for(int i=0;i



