Skip to content

[heesun-task] WEEK 02 Solutions#2412

Merged
SamTheKorean merged 4 commits intoDaleStudy:mainfrom
heesun-task:main
Mar 15, 2026
Merged

[heesun-task] WEEK 02 Solutions#2412
SamTheKorean merged 4 commits intoDaleStudy:mainfrom
heesun-task:main

Conversation

@heesun-task
Copy link
Contributor

@heesun-task heesun-task commented Mar 11, 2026

답안 제출 문제

작성자 체크 리스트

  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

검토자 체크 리스트

Important

본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!

  • 바로 이전에 올라온 PR에 본인을 코드 리뷰어로 추가해주세요.
  • 본인이 검토해야하는 PR의 답안 코드에 피드백을 주세요.
  • 토요일 전까지 PR을 병합할 수 있도록 승인해주세요.

@SamTheKorean
Copy link
Contributor

다른 분들처럼 pr제목 앞에 [깃허브 아이디] 넣어주시면 좋을 것 같습니다!

@kangdaia
Copy link
Contributor

문제가 pr에 연결되어 있는문제랑 다른것 같아요! 확인 부탁드려요. @heesun-task

@heesun-task
Copy link
Contributor Author

heesun-task commented Mar 13, 2026

문제가 pr에 연결되어 있는문제랑 다른것 같아요! 확인 부탁드려요. @heesun-task

안녕하세요 오늘 업데이트해놓겠습니다! 감사합니다

Update: 수정했습니다

@heesun-task heesun-task changed the title WEEK 02 Solutions [heesun-task] WEEK 02 Solutions Mar 13, 2026
@heesun-task heesun-task moved this from Solving to In Review in 리트코드 스터디 7기 Mar 13, 2026
s_dict = {}
for s_letter in s:
if s_letter in s_dict:
s_dict[s_letter] += 1
Copy link
Contributor

Choose a reason for hiding this comment

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

이 부분을 s_dict.get(s_letter, 0) + 1 방식으로 쓰면 한줄로 줄일 수 있을 것 같아요!

Copy link
Contributor

Choose a reason for hiding this comment

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

수고하셨어요!

  1. counter를 사용하면 (약간이지만) 빠르고 간단하게 쓰실 수 있어요. 물론 인터뷰나 실제 코딩 테스트를 보실때는 dict 방식으로 풀어서 쓰는게 설명하기 좋을 것 같네요.
  2. casefold를 고려하시면 좋을 것 같아요. 특수 문자가 섞여있는 언어의 경우는 문제가 생길 수 있어요.
  3. documentation을 쓰시는 것도 좋을 것 같아요. 시간복잡도와 공간복잡도를 써주셔서 좋은 것 같아요.

@SamTheKorean SamTheKorean merged commit e54bbb5 into DaleStudy:main Mar 15, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Completed in 리트코드 스터디 7기 Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

3 participants