摘要:
https://leetcode.com/problems/longest-harmonious-subsequence/#/description
阅读全文
posted @ 2017-05-22 17:32
Sempron2800+
阅读(145)
推荐(0)
编辑
摘要:
https://leetcode.com/problems/subarray-sum-equals-k/#/solutions 补充一个python的实现,和上面的思路一样: 下面进行解释,字典dic中存储的是某一个连续和的出现频率。例如nums=[1,1,1],k=2。 第一次循环时,sums等于
阅读全文
posted @ 2017-05-22 16:44
Sempron2800+
阅读(230)
推荐(0)
编辑
摘要:
public class Solution { public int FindUnsortedSubarray(int[] nums) { int n = nums.Length, beg = -1, end = -2, min = nums[n - 1], max = nums[0]; for (
阅读全文
posted @ 2017-05-22 16:06
Sempron2800+
阅读(144)
推荐(0)
编辑