Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Note: 从A串的结尾开始向前遍历,记当前pos为i。 对每一个i, ...
分类:
其他好文 时间:
2017-11-24 23:50:07
阅读次数:
108
Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that ...
分类:
其他好文 时间:
2017-11-13 18:22:55
阅读次数:
137
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Note: ...
分类:
其他好文 时间:
2017-11-13 17:00:15
阅读次数:
114
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, ...
分类:
其他好文 时间:
2017-11-11 14:19:49
阅读次数:
170
Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Note: s ...
分类:
编程语言 时间:
2017-11-07 23:02:04
阅读次数:
234
class Solution {public: /* * @param nums: A list of integers * @return: A integer indicate the sum of max subarray */ int maxSubArray(vector<int> &num ...
分类:
编程语言 时间:
2017-11-05 23:40:41
阅读次数:
256
class Solution {public: /* * @param nums: a list of integers * @return: A integer indicate the sum of minimum subarray */ int minSubArray(vector<int> ...
分类:
编程语言 时间:
2017-11-05 23:35:13
阅读次数:
245
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, ...
分类:
其他好文 时间:
2017-11-01 17:25:34
阅读次数:
142
原题链接在这里:https://leetcode.com/problems/subarray-product-less-than-k/description/ 题目: Your are given an array of positive integers nums. Count and print ...
分类:
其他好文 时间:
2017-10-31 14:58:13
阅读次数:
183
Maximum Subarray Given an array of integers, find a contiguous subarray which has the largest sum. Given the array [?2,2,?3,4,?1,2,1,?5,3], the contig ...
分类:
其他好文 时间:
2017-10-20 12:01:41
阅读次数:
114