이중 for문을 돌면서 i와 j가 같지 않은 경우 set에 넣는다. (중복 제거를 위해 set에 넣음)
set크기의 배열을 생성
iterator를 통해 set의 원소들을 모두 뽑아 배열에 넣는다.
Arrays.sort()를 통해 오름차순으로 정렬한다.
프로그래머스 두 개 뽑아서 더하기 java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters