Easy Hash Solution || Beats 100%
\n\n# C++\n\nclass Solution {\npublic:\n    bool isPossibleToSplit(vector<int>& nums) {\n        ios_base::sync_with_stdio(0);\n\n        int freq[101] = {}; //
\n\n# C++\n```\nclass Solution {\npublic:\n    bool isPossibleToSplit(vector<int>& nums) {\n        ios_base::sync_with_stdio(0);\n\n        int freq[101] = {}; // Initialize an array to store frequency of each number\n\n        // Iterate through each element in the vector\n        for (int num : nums)\n            if (++freq[num] > 2) // If frequency exceeds 2, return false\n                return false;\n\n        // If no number appears more than twice, return true\n        return true;\n    }\n};\n```\n![Cat asking for an Upvote.jpeg](https://assets.leetcode.com/users/images/c1d7bd7a-b876-4dd9-b657-5a3353a19239_1716439734.7248428.jpeg)\n
['Array', 'Hash Table', 'C++']