[Java] Sliding Window + HashMap
\nclass Solution {\n    public boolean findSubarrays(int[] nums) {\n        \n        Map<Long, Integer> map = new HashMap<>();\n        \n        int i=0, j=0;
```\nclass Solution {\n    public boolean findSubarrays(int[] nums) {\n        \n        Map<Long, Integer> map = new HashMap<>();\n        \n        int i=0, j=0; long sum = 0;\n        while(j < nums.length) {\n            \n            sum += nums[j];\n            \n            if(j-i+1 < 2) j++;\n            \n            else if(j-i+1 == 2) {  \n                if(map.containsKey(sum)) return true;\n                else map.put(sum, map.getOrDefault(sum, 0) + 1);\n                sum -= nums[i];\n                j++; i++;\n            }\n        }\n        \n        return false;\n    }\n}\n```\n
['Sliding Window', 'Java']