Sliding Window
iteye_17352
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode - Substring with Contentaion of All Words
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and wi...原创 2015-06-18 10:01:33 · 111 阅读 · 0 评论 -
Leetcode - Longest Substring with At Most Two Distinct Characters
Given a string, find the length of the longest substring T that contains at most 2 distinct characters. For example, Given s = “eceba”, T is "ece" which its length is 3. [分析] 滑动窗口法,窗口内始终仅保留至多两个...原创 2015-07-22 08:32:16 · 132 阅读 · 0 评论 -
Leetcode - Minimum Size Subarray Sum
Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return 0 instead. For example, given the array [2,3,1...原创 2015-07-22 21:01:05 · 136 阅读 · 0 评论 -
Leetcode - Sliding Window Maximum
Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window m...原创 2015-07-23 09:18:03 · 146 阅读 · 0 评论
分享