package com.xxx.amp.magenta.livecodebench.solution;

import java.util.HashSet;
import java.util.List;

public class LeetcodeCanSplitSolution {
    public boolean isPossibleToSplit(List<Integer> nums) {
        HashSet<Integer> uniqueElements = new HashSet<>(nums);
        int distinctCount = uniqueElements.size();
        int halfLength = nums.size() / 2;
        
        return distinctCount >= halfLength;
    }
}
