TreeSet으로 하니깐 되네요.
http://docs.oracle.com/javase/8/docs/api/ 에서보니
It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time.
랍니다.
2750번 - 수 정렬하기
TreeSet으로 하니깐 되네요.
http://docs.oracle.com/javase/8/docs/api/ 에서보니
It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time.
랍니다.
댓글을 작성하려면 로그인해야 합니다.
mino 9년 전
흠....어디가 잘못됐는지 모르겠네요ㅜㅜ
기본적으로 HashSet에 넣어서 순서대로 출력을 한건데
틀리다고 나오네요. 데이터는 중복되는게 안들어 오니 문제가 없다고 생각하는데...
뭐가 잘못된걸까요?
자바 사용하는 분들 도움을 주시면 안될까요ㅜㅜ