Given an integer array nums, find a subarray that has the largest product, and return the product. The test cases are generated so that the answer will fit in a 32-bit integer. Note that the product ...
現在ITエンジニアとして働いていますが、コーディング・アルゴリズム力をもっと鍛えたいと思い、LeetCodeで学んだ内容をメモ的にアウトプットしています。 今回解いてみた問題は「560. Subarray Sum Equals K」です。 0番目: current_sum = 1, current_sum - k = -8(辞書に ...