Merged
Conversation
Moonjonghoo
approved these changes
Jan 27, 2025
Collaborator
Moonjonghoo
left a comment
There was a problem hiding this comment.
중복을 줄이거나 계산과정에서 미리 결과를 더하는식으로 수정해봐도 좋을거같아요!
한주간 고생하셨습니다.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 푼 문제
📝 간단한 풀이 과정
모스 부호
모스 부호를 키, 알파벳을 값으로 가지는 morse 객체를 생성하고, 공백으로 나눠진 모스 부호 배열을 순회하면서 해당 알파벳을 찾아 결과 문자열에 추가하는 방식으로 해결했습니다.
A로 B 만들기
각 문자열의 문자를 카운팅하여 객체로 만든 후, 각 키와 값을 비교하여 모든 문자가 동일하면 1, 그렇지 않으면 0을 반환하는 방식으로 해결했습니다.
진료 순서 정하기
배열을 내림차순으로 정렬하여 각 값의 순위를 매핑하는 Map 객체를 생성한 뒤, 원래 배열의 각 값에 대해 순위를 찾아 반환하는 방식으로 해결했습니다.
등수 매기기
평균 점수를 계산한 뒤, 내림차순으로 정렬된 배열을 생성하고, 원래 배열의 각 평균 점수에 대해 정렬된 배열에서의 순위를 찾아 반환하는 방식으로 구현했습니다.
완주하지 못한 선수
참가자 이름의 개수를 세어 객체로 저장한 뒤, 완주한 이름에 대해 개수를 줄이고, 최종적으로 값이 0보다 큰 이름을 반환하는 방식으로 구현했습니다.