Simple Swift Solution
CodeCode
![Screenshot 2025-03-31 at 11.33.07 AM.png](https://assets.leetcode.com/users/images/65ff6052-4dda-439b-afde-ff1e5d0cdf52_1743410017.067591.png)


# Code
```swift []
class Solution {
    func isPossibleToSplit(_ nums: [Int]) -> Bool {
        var freq = [Int: Int]()
        for num in nums {
            freq[num, default: 0] += 1
        }
        for (_, value) in freq {
            if value > 2 {
                return false
            }
        }
        return true
    }
}
```
![Screenshot 2025-03-31 at 11.36.05 AM.png](https://assets.leetcode.com/users/images/f1dec5e4-dc09-46a1-8979-8bf3b054a4b4_1743410254.64552.png)

# Code
```swift []
class Solution {
    func isPossibleToSplit(_ nums: [Int]) -> Bool {
        var freq = [Int: Int]()
        for num in nums {
            freq[num, default: 0] += 1
            if freq[num]! > 2 {
                return false
            }
        }
        return true
    }
}
```
['Swift']