随笔分类 -  Sliding Window

摘要:public class Solution { public String minWindow(String s, String t) { if(s == null || s.length() < t.length() || s.length() == 0){ return ""; } HashMa 阅读全文
posted @ 2023-01-29 01:35 苗妙苗 阅读(25) 评论(0) 推荐(0)
摘要:Given a string s and an integer k, return the length of the longest substring of s that contains at most k distinct characters. Example 1: Input: s = 阅读全文
posted @ 2022-11-12 02:17 苗妙苗 阅读(24) 评论(0) 推荐(0)
摘要:You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can 阅读全文
posted @ 2022-10-03 01:52 苗妙苗 阅读(42) 评论(0) 推荐(0)
摘要:https://stackoverflow.com/questions/2459653/how-to-find-smallest-substring-which-contains-all-characters-from-a-given-string import java.io.*; import 阅读全文
posted @ 2022-06-24 09:39 苗妙苗 阅读(30) 评论(0) 推荐(0)