Skip to content
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

[GUMUNYEONG] Week4 Solutions #417

Merged
merged 8 commits into from
Sep 7, 2024
Merged

[GUMUNYEONG] Week4 Solutions #417

merged 8 commits into from
Sep 7, 2024

Conversation

GUMUNYEONG
Copy link
Contributor

@GUMUNYEONG GUMUNYEONG commented Sep 3, 2024

답안 제출 문제

체크 리스트

  • PR을 프로젝트에 추가하고 Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 Status를 In Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@GUMUNYEONG GUMUNYEONG self-assigned this Sep 3, 2024
@github-actions github-actions bot added the js label Sep 3, 2024
Copy link
Contributor

@HC-kang HC-kang left a comment

Choose a reason for hiding this comment

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

@GUMUNYEONG 안녕하세요 문영님!
4주차 한 주도 고생하셨습니다!

아직 inReview 상태로 두진 않으셨지만, 푸실 문제가 두 개만 올라와 있어서 우선 리뷰 남겼습니다!
리뷰로 넘겨주시면 승인토록 하겠습니다~!

// TC
// nums 정렬을 하기 위해서 순회 (길이 n)
// 빠진 숫자를 찾기위해서 순회 (최대길이 n)
// O(2n) 따라서 시간 복잡도는 O(n)
Copy link
Contributor

Choose a reason for hiding this comment

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

정렬을 위한 순회가 최선의 경우에는 Ω(n)이긴 하지만, 평균적으로는 결과가 달라지기 때문에 수정이 필요해 보입니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

앗 넵 제가 생각이 짧았던 부분이네요..! 정렬 함수의 시간 복잡도에 대해서 자세히 알아봐야겠습니다. 피드백 감사합니다..!

str = str.toLowerCase().replace(/[^a-z0-9]/g, "");

return str;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

전처리 기능을 별도 함수로 분리하고자 하는 의도이실까요?
그렇다면 preprocess, sanitize, normalize 등의 작명도 활용하실 수 있을 것 같아요
사실상 한 줄 짜리 함수이다 보니 인라인도 충분히 괜찮지 않을까 해서 의견 드립니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

네 가독성이 더 좋다고 판단해서 함수를 따로 빼봤습니다..! 항상 변수명과 함수명을 작성하는데 있어서 어려움을 느끼곤 하는데, 추천해주셔서 감사합니다

@GUMUNYEONG GUMUNYEONG marked this pull request as ready for review September 6, 2024 08:25
@GUMUNYEONG GUMUNYEONG requested a review from a team as a code owner September 6, 2024 08:25
Copy link
Contributor

@HC-kang HC-kang left a comment

Choose a reason for hiding this comment

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

리뷰로 넘겨주셨는데 제가 확인이 조금 늦었네요!
즐거운 주말 보내시길 바랍니다~!

@GUMUNYEONG GUMUNYEONG merged commit 0778811 into DaleStudy:main Sep 7, 2024
1 check passed
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