using map, easy C++ code
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\nAny element\'s count > 2 will cause repetition in the splitted array\n De
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nAny element\'s count > 2 will cause repetition in the splitted array\n<!-- Describe your approach to solving the problem. -->\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 isPossibleToSplit(vector<int>& a) {\n        int n=a.size();\n        map<int,int> mp;\n        for(int i:a)\n            mp[i]++;\n        for(auto &it:mp)\n            if(it.second>2)return false;\n        return true;\n    }\n};\n```
['Array', 'Hash Table', 'Counting', 'C++']