摘要: 思路:用map.put(cur_sum, i); 动不动就break 一开始设置end = -1是因为没找到 https://www.geeksforgeeks.org/find-subarray-with-given-sum-in-array-of-integers/ // Java progra 阅读全文
posted @ 2020-10-31 05:28 苗妙苗 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-10-31 05:19 苗妙苗 阅读(72) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums and an integer k, return the total number of continuous subarrays whose sum equals to k. Example 1: Input: nums = [1,1 阅读全文
posted @ 2020-10-31 05:05 苗妙苗 阅读(86) 评论(0) 推荐(0) 编辑