//! - Discussions: <https://leetcode.com/problems/continuous-subarray-sum/discuss/?currentPage=1&orderBy=most_votes&query=> //! Given an integer array nums and an ...
# Given an integer array nums and an integer k, return true if nums has a good subarray or false otherwise. # A good subarray is a subarray where: # its length is at least two, and # the sum of the ...
現在ITエンジニアとして働いていますが、コーディング・アルゴリズム力をもっと鍛えたいと思い、LeetCodeで学んだ内容をメモ的にアウトプットしています。 今回解いてみた問題は「560. Subarray Sum Equals K」です。 0番目: current_sum = 1, current_sum - k = -8(辞書に ...