地址 https://leetcode-cn.com/contest/weekly-contest-190/problems/maximum-number-of-vowels-in-a-substring-of-given-length/ 题目描述 给你字符串 s 和整数 k 。 请返回字符串 s ...
分类:
其他好文 时间:
2020-05-24 13:29:42
阅读次数:
169
现象:升级docker后镜像无法导入 原因: api现在最多只能支持到1.39,但是client是1.40版本的 解决办法: 修改系统环境变量即可 临时: export DOCKER_API_VERSION=1.39 永久修改: 在/etc/profile和 ~/.bashrc 最后追加一个 exp ...
问题: 给定一个数组,其为循环数组(最后一个元素的下一个元素为第一个元素)。 求连续子数组和的最大值。 Example 1: Input: [1,-2,3,-2] Output: 3 Explanation: Subarray [3] has maximum sum 3 Example 2: Inp ...
分类:
其他好文 时间:
2020-05-23 18:26:27
阅读次数:
54
链接:https://leetcode-cn.com/problems/longest-continuous-increasing-subsequence/ 代码: class Solution { public: int findLengthOfLCIS(vector<int>& nums) { ...
分类:
其他好文 时间:
2020-05-23 00:13:44
阅读次数:
45
题目链接: http://codeforces.com/contest/1343/problem/CC. Alternating Subsequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard ...
分类:
其他好文 时间:
2020-05-21 22:28:44
阅读次数:
79
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi ...
分类:
其他好文 时间:
2020-05-21 10:38:00
阅读次数:
54
题目 With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing ...
分类:
其他好文 时间:
2020-05-19 14:31:29
阅读次数:
51
和谐数组是指一个数组里元素的最大值和最小值之间的差别正好是1。 现在,给定一个整数数组,你需要在所有可能的子序列中找到最长的和谐子序列的长度。 来源:力扣(LeetCode) class Solution { public: int findLHS(vector<int>& nums) { unor ...
分类:
其他好文 时间:
2020-05-18 23:01:29
阅读次数:
74
Description Given an integer array , find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Examp ...
分类:
其他好文 时间:
2020-05-18 22:47:34
阅读次数:
65
题目 Given a sequence of K integers { N?1?? , N?2?? , ..., N?K?? }. A continuous subsequence is defined to be { Ni?? , N?i+1?? , ..., N?j?? } where 1≤i≤ ...
分类:
其他好文 时间:
2020-05-18 22:37:14
阅读次数:
57