본문 바로가기

도토리 줍는 개발자 감자

검색하기
도토리 줍는 개발자 감자
프로필사진 감._.자

  • 분류 전체보기 (33)
    • 컴퓨터비전관련 (8)
    • 알고리즘공부 (10)
    • 코틀린(Kotlin)공부 (5)
    • SQL공부 (6)
    • JAVA 꿀팁 (3)
    • Metal 공부~ㅇ~ (1)
    • Domain Adaptation (0)
    • Contrastive learning (0)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
  • kotlin
  • 코틀린
  • 오름차순
  • 1036
  • 자바
  • Comparator
  • 내림차순
  • java
  • 백준
  • HashMap
  • BigInteger
  • 36진수
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록HashMap (1)

도토리 줍는 개발자 감자

HashMap Value값 BigInteger 내림차순 정렬하기

Map.Entry값을 받아온 뒤 Collections.sort,Comparator 사용하여 정렬하면됨. 여기서 Comparator 함수의 return 값으로 o2.getValue().compareTo(o1.getValue()) 를 작성하면 내림차순 정렬이 된다. compareTo는 BigInteger의 메서드임! 참고: https://docs.microsoft.com/ko-kr/dotnet/api/system.numerics.biginteger.compareto?view=net-6.0 BigInteger1.compareTo(BigInteger2) 반환 값 설명 0보다 작음 BigInteger1이 BigInteger2 보다 작다. 0 BigInteger1과 BigInteger2 값이 같다. 0보다 큼 Bi..

JAVA 꿀팁 2021. 12. 16. 18:19
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바