코드 public int solution(int[] nums) { HashSet hs = new HashSet(); for(int i : nums) { if(!hs.contains(i)) { hs.add(i); } } return nums.length/2>hs.size()?hs.size():nums.length/2; }