Google, Facebook高頻面試題 | Subarray Sum Equals K

先一起來看看題目: 題目描述 Given an array of integers and an integer k, you need to find the total number of contiguous subarrays whose sum equals to k. Example 1: Input: nums = [1,1,1], k = 2Output: 2 [1, 1, 1]
相關文章
相關標籤/搜索