문제 https://leetcode.com/problems/find-the-duplicate-number/ 문제 풀기 전 제한조건을 부분적으로 만족한다면 HashSet으로 풀어 볼 수 있다. 제한조건을 부분적으로 만족한다면 Arrays.sort으로도 풀어 볼 수 있다. 직접 푼 풀이 소요시간: #HashSet 풀이 class Solution { public int findDuplicate(int[] nums) { Set set = new HashSet(); for(int i=0; i