All prompts are owned by LeetCode. To view the prompt, click the title link above.
First completed : May 31, 2024
Last updated : July 01, 2024
Related Topics : Array, Hash Table
Acceptance Rate : 65.201 %
class Solution:
def findSubarrays(self, nums: List[int]) -> bool:
sumsSet = set()
for i in range(0, len(nums) - 1) :
sum = nums[i] + nums[i + 1]
if (sum in sumsSet) :
return True
sumsSet.add(sum)
return False