Notice
Recent Posts
Recent Comments
Link
목록Hsah (1)
나의 개발일지
문제 : https://school.programmers.co.kr/learn/courses/30/lessons/1845 맵, 세트 def solution(nums): return min(len(set(nums)), len(nums) / 2) 자바 import java.util.*; class Solution { public int solution(int[] nums) { int answer = 0; HashMap map = new HashMap(); for (int n : nums) { map.put(n, 0); } int a = map.keySet().size(); int b = nums.length / 2; return Math.min(a, b); } }
프로그래머스
2023. 6. 29. 14:10