[프로그래머스 | Lv. 1 | JavaScript] 폰켓몬
·
알고리즘/문제
Link코딩테스트 연습 - 폰켓몬 문제풀이(1)function solution(nums) { let half = Math.floor(nums.length / 2); let types = new Set(nums) //return types.size > half ? half : types.size; return Math.min(types.size, half);}