Easy Solution 🚀 || C++ || Beats 100% || TC - O(n)
Complexity

Time complexity: O(n)


Space complexity: O(n)

Code
# Complexity
- Time complexity: O(n)

- Space complexity: O(n)

# Code
```cpp []
class Solution {
public:
    bool isPossibleToSplit(vector<int>& nums) {
        unordered_map<int, int> mp;
        for(int i=0;i<nums.size();i++){
            mp[nums[i]]++;
            if(mp[nums[i]]>2) return false;
        }

        return true;
    }
};
```
['C++']