Simple Easy to Understand Java Code || Beats 100%
Complexity\n- Time complexity:\nO(n)\n- Space complexity:\nO(n)\n# Code\n\nclass Solution {\n    public boolean findSubarrays(int[] nums) {\n        HashSet<Int
# Complexity\n- Time complexity:\nO(n)\n- Space complexity:\nO(n)\n# Code\n```\nclass Solution {\n    public boolean findSubarrays(int[] nums) {\n        HashSet<Integer> set = new HashSet<>();\n        for(int i=1; i<nums.length; i++){\n            int sum = nums[i] + nums[i-1];\n            if(set.contains(sum)){\n                return true;\n            }\n            set.add(sum);\n        }\n        return false;\n    }\n}\n```
['Hash Table', 'Java']