Skip to content

[jylee2033] WEEK 02 solutions#2414

Merged
jylee2033 merged 5 commits intoDaleStudy:mainfrom
jylee2033:main
Mar 14, 2026
Merged

[jylee2033] WEEK 02 solutions#2414
jylee2033 merged 5 commits intoDaleStudy:mainfrom
jylee2033:main

Conversation

@jylee2033
Copy link
Contributor

@jylee2033 jylee2033 commented Mar 11, 2026

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

Copy link
Member

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

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

풀이 제출해 주셔서 감사합니다! 다른 참여자 분들처럼 작성하신 코드의 시간/공간 복잡도를 구해서 주석으로 표시해보시면 어떨까요?

Comment on lines +10 to +14
for letter in t:
if letter not in char_count:
char_count[letter] = 1
else:
char_count[letter] += 1
Copy link
Member

Choose a reason for hiding this comment

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

파이썬 사전의 get() 함수를 활용하시면 코드가 좀 더 간결해질 것 같습니다.
(참고: https://daleseo.com/python-dictionary/)

Suggested change
for letter in t:
if letter not in char_count:
char_count[letter] = 1
else:
char_count[letter] += 1
for letter in t:
char_count[letter] = char_count.get(letter, 0) + 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

달레님 감사합니다! 앞으로 기본 메서드들부터 차근차근 더 챙겨봐야겠어요 :)

@jylee2033 jylee2033 moved this from Solving to In Review in 리트코드 스터디 7기 Mar 14, 2026
@jylee2033 jylee2033 merged commit 638a517 into DaleStudy:main Mar 14, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Completed in 리트코드 스터디 7기 Mar 14, 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.

2 participants