1月24日-备孕春招40天-第14天
①leetcode复盘+刷题
最小覆盖子字符串
https://leetcode-cn.com/problems/minimum-window-substring/
// 判断一个Map(ori)是否是另一个Map(cnt)的子集
Map<Character, Integer> ori = new HashMap();
Map<Character, Integer> cnt = new HashMap();
//使用keySet()方法
public boolean check(){
for(Character key : ori.keySet()){
if(cnt.getOrDefault(key,0) > ori.get(key)){
return false;
}
}
return true;
}
//使用迭代器
public boolean check(){
Iterator iter = ori.entrySet().iterator();
while(iter.hasNext()){
Map.Entry entry = (Map.Entry) iter.next();
Character key = (Character) entry.getKey();
Integer val = (Integer) entry.getValue();
if (cnt.getOrDefault(key, 0) < val) {
return false;
}
}
return true;
}
回溯求组合
https://leetcode-cn.com/problems/combinations/
回溯求子集
https://leetcode-cn.com/problems/subsets/solution/hui-su-qiu-zi-ji-by-19216801-pd4i/
回溯二维数组单词搜索
https://leetcode-cn.com/problems/word-search/solution/dan-ci-sou-suo-hui-su-by-19216801-0g8s/
双指针删除重复项
②剑指offer
镜像二叉树、螺旋矩阵、栈最小元素。
③八股文
AQS锁相关
⑤mybatis
结束第14天