Skip to content

[reeseo3o] WEEK 02 solutions#2427

Merged
reeseo3o merged 4 commits intoDaleStudy:mainfrom
reeseo3o:main
Mar 14, 2026
Merged

[reeseo3o] WEEK 02 solutions#2427
reeseo3o merged 4 commits intoDaleStudy:mainfrom
reeseo3o:main

Conversation

@reeseo3o
Copy link
Contributor

@reeseo3o reeseo3o commented Mar 14, 2026

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

@reeseo3o
Copy link
Contributor Author

@DaleStudy 리뷰해줘

@dalestudy
Copy link
Contributor

dalestudy bot commented Mar 14, 2026

전체적으로 깔끔하게 다양한 풀이 방식을 제시했고, 가독성도 좋아서 매우 잘 정리하셨습니다! 몇 가지 제안 드리자면:

  1. 시간/공간 복잡도 명시: 각 함수에 대한 TC/SC를 주석으로 추가하면 이해에 도움이 될 것 같습니다. 예를 들어, climbStairs는 "TC: O(n), SC: O(1)" 등.

  2. 코드 가독성 및 스타일: 함수 내부에 주석이 잘 달려있어 이해하기 쉽지만, 일부 변수명(prev1, prev2)은 prevcurr처럼 좀 더 직관적일 수 있습니다. 또한, productExceptSelf3productsresult로 명명하는 것도 고려해보세요.

  3. 접근법 제안: productExceptSelf는 brute force보다 prefix-suffix 또는 두 포인터 방식을 사용하는 것이 시간 복잡도면에서 더 좋습니다. 이미 구현하셨지만, 참고로 공간 최적화 버전 (productExceptSelf3)이 가장 효율적입니다.

  4. Unicode 고려: isAnagram2에서 Unicode 안전성을 고려한 점 좋습니다. 만약 확장성을 원하시면, 문자열 길이 체크도 [...s].length로 하는 것도 좋습니다.

  5. 일관성 유지: 함수 선언에서 화살표 함수(const foo = () => {})와 전통적인 함수 선언(function foo() {})가 혼합되어 있는데, 일관성을 유지하는 것도 좋습니다.

전반적으로 훌륭한 작업입니다! 다양한 풀이법을 제시해서 학습에 큰 도움이 될 것 같아요. 계속해서 이렇게 깔끔한 정리와 다양한 접근법을 보여주세요!

@DaleStudy DaleStudy deleted a comment from dalestudy bot Mar 14, 2026
@reeseo3o
Copy link
Contributor Author

@DaleStudy 승인

Copy link
Contributor

@dalestudy dalestudy bot left a comment

Choose a reason for hiding this comment

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

승인되었습니다! 👍

@reeseo3o reeseo3o merged commit 78828fa into DaleStudy:main Mar 14, 2026
3 checks 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.

1 participant