Skip to content

Conversation

@heegane
Copy link
Collaborator

@heegane heegane commented May 24, 2024

240524 이현희 0x04 풀이

@lee-JunR lee-JunR self-assigned this May 25, 2024
Copy link
Owner

@lee-JunR lee-JunR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깔끔한 풀이 잘 봤습니다!
레포 PR 알림 오면 1등이 항상 현희님이네요!! 정말 멋져요!!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스트림 사용이 익숙하신 것 같네요!
저는 for문으로 하나하나 입력해줬는데... 하나 더 배우고 갑니다!

Comment on lines +11 to +17
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변수 하나를 줄일 수 있을 것 같지만 가독성을 위해 따로 놓아도 상관없을 것 같네요..!
혹시 이러한 상황에서 현희님은 변수를 선언하는 기준이 있으신지 궁금하네요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사실 변수 개수에 대해서 생각해 본 적이 없지만...! 변수 개수가 많지 않은 이상 가독성을 위해서 따로 선언할 것 같습니다 ㅎㅎ!

Comment on lines +31 to +36
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

보통 사람들이 indent가 3개 이상 들어가면 이해하기 어려워진다고 해요!
물론 코딩 테스트가 아닌 실제 프로젝트 코드에서는 함수화로 indent를 줄이시겠지만!
코딩 테스트를 할때처럼 어쩔 수� 없을 때는 꼭 기능 별 주석이 아니더라도

if(...){
      if(...){
        ...
      } else { // 2의 else
        ...
      }
    }else{ // 1 의 else
      ...
 }

이런식으로 주석을 달아주시면 코드를 이해하기 훨씬 쉬울 것 같아요!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TMI.
그리고 ide 코딩 컨벤션 혹시 따로 설정을 해두셨던 건가요?!
tab의 간격 길이가 긴것 같아서 확인해보니 1tab 당 8칸인 것 같아서요!

저는 참고로 구글 코딩 컨벤션 을 ide 로 적용시켜놓고 있어요!
관심 있으시면 한번 적용해보시면 좋을 것 같아요~ 관련 포스트

Comment on lines +21 to +25
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아..! 이렇게 쉽게!! 빈도수를 계산할 수 있었네요... 저는 HashMap으로 딕셔너리를 만들어서 하나하나 카운팅했는데 훨씬 코드가 깔끔한 것 같아요!

@lee-JunR lee-JunR merged commit 7d69624 into lee-JunR:main May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants