摘要:
Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to 阅读全文
posted @ 2020-04-03 15:51
CNoodle
阅读(210)
评论(0)
推荐(0)
摘要:
Given two strings s and p, return an array of all the start indices of p's anagrams in s. You may return the answer in any order. An Anagram is a word 阅读全文
posted @ 2020-04-03 14:57
CNoodle
阅读(256)
评论(0)
推荐(0)
摘要:
Given a string s, return the length of the longest substring that contains at most two distinct characters. Example 1: Input: s = "eceba" Output: 3 Ex 阅读全文
posted @ 2020-04-03 10:03
CNoodle
阅读(349)
评论(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 @ 2020-04-03 09:48
CNoodle
阅读(239)
评论(0)
推荐(0)
摘要:
Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The a 阅读全文
posted @ 2020-04-03 08:29
CNoodle
阅读(489)
评论(0)
推荐(0)
摘要:
Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicat 阅读全文
posted @ 2020-04-03 07:02
CNoodle
阅读(614)
评论(0)
推荐(0)
摘要:
最小窗口子串。题意是给两个字符串S和T,T比较短。请输出一个最小的S的子串,包含了T中出现的所有字母。例子, Example: Input: S = "ADOBECODEBANC", T = "ABC" Output: "BANC" 这个题因为有时间复杂度的要求所以只能用到一个叫做滑动窗口的思想。在 阅读全文
posted @ 2020-04-03 06:23
CNoodle
阅读(149)
评论(0)
推荐(0)