要求 给定一个含有 n 个正整数的数组和一个正整数 s 找出该数组中满足其和 ≥ s 的长度最小的连续子数组 如果不存在符合条件的连续子数组,返回 0 示例 输入:s = 7, nums = [2,3,1,2,4,3] 输出:2 解释:子数组 [4,3] 是该条件下的长度最小的连续子数组 思路 暴力 ...
分类:
其他好文 时间:
2020-03-30 09:40:08
阅读次数:
94
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hor ...
分类:
其他好文 时间:
2020-03-29 12:34:44
阅读次数:
57
给定一个单词列表,我们将这个列表编码成一个索引字符串 S 与一个索引列表 A。 例如,如果这个列表是 ["time", "me", "bell"],我们就可以将其表示为 S = "time#bell#" 和 indexes = [0, 2, 5]。 对于每一个索引,我们可以通过从字符串 S 中索引的 ...
分类:
其他好文 时间:
2020-03-28 23:26:27
阅读次数:
73
介绍了Trie树(又称字典树、单词查找树、前缀树)的C++实现和LeetCode上实例。 ...
分类:
编程语言 时间:
2020-03-28 17:54:10
阅读次数:
67
info memory参数简介 used_memory_human:262.89M used_memory_rss:267489280 mem_fragmentation_ratio:0.97 (Redis在编译时便会指定内存分配器;内存分配器可以是 libc 、jemalloc或者tcmalloc ...
分类:
其他好文 时间:
2020-03-23 15:28:34
阅读次数:
91
题目: https://leetcode cn.com/problems/minimum window substring/ 给你一个字符串 S、一个字符串 T,请在字符串 S 里面找出:包含 T 所有字母的最小子串。 示例: 输入: S = "ADOBECODEBANC", T = "ABC" 输 ...
分类:
编程语言 时间:
2020-03-22 18:12:26
阅读次数:
81
方案一: <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/> 方案二: document.doc ...
分类:
移动开发 时间:
2020-03-22 17:32:01
阅读次数:
164
最小路径和。题意是给一个二维矩阵,每个格子上都有一个非负整数。请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。例子, Example: Input: [ [1,3,1], [1,5,1], [4,2,1] ] Output: 7 Explanation: Because the pat ...
分类:
其他好文 时间:
2020-03-22 12:25:55
阅读次数:
67
945. Minimum Increment to Make Array Unique (使数组唯一的最小增量) 链接 https://leetcode cn.com/problems/minimum increment to make array unique 题目 给定整数数组 A,每次 mov ...
分类:
其他好文 时间:
2020-03-22 10:55:35
阅读次数:
54
2020年3月21日 Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) Push element x onto stack. pop() ...
分类:
其他好文 时间:
2020-03-21 21:26:35
阅读次数:
59