3046. Split the Array | Java | HashMap
Code
# Code
```java []
class Solution {
    public boolean isPossibleToSplit(int[] nums) {
        Map<Integer, Integer> map = new HashMap<>();

        for (int num : nums)
            map.put(num, map.getOrDefault(num, 0) + 1);

        for (Map.Entry<Integer, Integer> entry : map.entrySet())
            if (entry.getValue() > 2)
                return false;

        return true;
    }
}
```
['Hash Table', 'Counting', 'Java']