Skip to content

[JustHm] Week 02 solutions #1205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 12, 2025
Merged

[JustHm] Week 02 solutions #1205

merged 6 commits into from
Apr 12, 2025

Conversation

JustHm
Copy link
Contributor

@JustHm JustHm commented Apr 6, 2025

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

@ayosecu ayosecu self-requested a review April 6, 2025 05:50

return charCount
}
}
Copy link
Contributor

@ayosecu ayosecu Apr 6, 2025

Choose a reason for hiding this comment

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

저는 Swift 언어를 다룬 적이 없지만, 세가지 방법으로 구현하신 것 같습니다.

  1. Dictionary 를 이용하여 문자별로 count 를 세고, 체크 (없으면 False, 있으면 감소 시키고, 최종 empty 인지 체크)
  2. sort 를 이용하여 같은지 비교
  3. Counter 구현 (Char key 가 아닌 26 size 의 integer 배열 이용)

다양한 방법으로 구현하신 것을 보고, python 의 Counter 를 이용해서 딸랑 한개의 메소드만을 구현한 제 자신을 반성하게 되었습니다. 😭
속도와 구현 난이도를 구별해주신 부분도 좋았습니다.
다만, 속도 비교의 경우 알고리즘에서는 Big O 표기법이 표준(?) 으로 인식 되는 만큼 Big O 표기법을 이용해서 시간/공간 복잡도를 작성(노트)해보신다면, 추후 인터뷰에 도움이 될 것 같다는 생각을 해봅니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

리뷰 감사합니다! 시간복잡도 생각해서 메모해두는것도 좋겠네요.. 습관을 좀 들여야겠습니다 ㅎㅎ

@JustHm JustHm moved this from Solving to In Review in 리트코드 스터디 4기 Apr 9, 2025
Copy link
Contributor

@ayosecu ayosecu left a comment

Choose a reason for hiding this comment

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

Swift Code 는 잘 모르지만 pseudocode 처럼 생각하고 리뷰를 진행해봤습니다.
전반적으로 제가 작성한 알고리즘과 비슷한데, 몇몇 문법들은 더 직관적으로 보이네요.
3Sum 코드가 안 보이는데, 3Sum 코드 올라오면 추가로 확인해보겠습니다.
우선 Approve 처리 하겠습니다.

@JustHm JustHm merged commit 14f61dc into DaleStudy:main Apr 12, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Completed in 리트코드 스터디 4기 Apr 12, 2025
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