Skip to content

Conversation

@donggi-lee-bit
Copy link
Collaborator

접근방법

  • Map 을 이용하여 귤의 크기를 key로 하여 귤의 갯수를 저장합니다
  • value 를 기준으로 내림차순 정렬하여 k개가 될 때까지 Map 에서 꺼내고 k개보다 적을 때까지 반복합니다
  • 몇 가지의 귤을 상자에 담았는지 반환합니다

내 풀이의 시간복잡도

O(N)

참고자료

고민사항, 질문

리뷰받고 싶은 부분

@donggi-lee-bit donggi-lee-bit self-assigned this Dec 9, 2022
@donggi-lee-bit donggi-lee-bit linked an issue Dec 9, 2022 that may be closed by this pull request
@donggi-lee-bit donggi-lee-bit merged commit 1da8d40 into main Jan 3, 2023
@donggi-lee-bit donggi-lee-bit deleted the donggi-lee-bit-patch-25 branch January 3, 2023 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2022.12.07] 프로그래머스 - 귤 고르기

2 participants