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