Easy Solution with Hash Table || C++ || Java || Python
Intuition\n Describe your first thoughts on how to solve this problem. \nCount the frequency of the element in the array! if any element exist more then twice r
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nCount the frequency of the element in the array! if any element exist more then twice return false! Otherwise return true;\n\n# Approach\nCounting, Hash Table\n\n# Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(n)\n\n# Codes\n<details>\n<summary>Click here to see C++ Code</summary>\n\n```c++\nclass Solution {\npublic:\n    bool isPossibleToSplit(vector<int>& nums) {\n        unordered_map <int, int> m;\n        for(auto d: nums) {\n            m[d]++;\n            if(m[d]==3) return false;\n        }\n        return true;\n    }\n};\n```\n</details>\n<details>\n  <summary>Click here to see Java Code</summary>\n\n```java\nclass Solution {\n    public boolean isPossibleToSplit(int[] nums) {\n        HashMap<Integer, Integer> map = new HashMap<>();\n        for (int num : nums) {\n            map.put(num, map.getOrDefault(num, 0) + 1);\n            if (map.get(num) == 3) return false;\n        }\n        return true;\n    }\n}\n```\n</details>\n<details>\n<summary>Click here to see Python3 Code</summary>\n\n```python\nclass Solution(object):\n    def isPossibleToSplit(self, nums):\n        m = {}\n        for num in nums:\n            m[num] = m.get(num, 0) + 1\n            if m[num] == 3:\n                return False\n        return True\n\n```\n</details>\n\n# For any query don\'t forget to comment below! Otherwise please Upvote\uD83D\uDE0A
['Array', 'Hash Table', 'Counting', 'Python', 'C++', 'Java']