560.Subarray Sum Equals K

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:

Input:nums = [1,1,1], k = 2 Output: 2

 

https://www.cnblogs.com/MarkLeeBYR/p/17375802.html
posted @ 2023-03-20 11:38  MarkLeeBYR  阅读(10)  评论(0编辑  收藏  举报