Beats 100.00%of users with C++
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nStore the sum of 2 cons
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nStore the sum of 2 consecutive numbers in a map along with it\'s frequency. Then iterate over the map to check if more than 1 time the sum of 2 numbers is present.\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    bool findSubarrays(vector<int>& a) {\n        int n=a.size();\n        map<int,int>m;\n        for(int i=0;i<n-1;i++){\n            m[a[i]+a[i+1]]++;\n        }\n        for(auto &ele:m) if(ele.second>1) return 1;\n         return 0;\n    }\n};\n```
['C++']