-
-
Notifications
You must be signed in to change notification settings - Fork 195
[GUMUNYEONG] Week4 Solutions #417
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GUMUNYEONG 안녕하세요 문영님!
4주차 한 주도 고생하셨습니다!
아직 inReview
상태로 두진 않으셨지만, 푸실 문제가 두 개만 올라와 있어서 우선 리뷰 남겼습니다!
리뷰로 넘겨주시면 승인토록 하겠습니다~!
missing-number/GUMUNYEONG.js
Outdated
// TC | ||
// nums 정렬을 하기 위해서 순회 (길이 n) | ||
// 빠진 숫자를 찾기위해서 순회 (최대길이 n) | ||
// O(2n) 따라서 시간 복잡도는 O(n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정렬을 위한 순회가 최선의 경우에는 Ω(n)이긴 하지만, 평균적으로는 결과가 달라지기 때문에 수정이 필요해 보입니다!
There was a problem hiding this comment.
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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
전처리 기능을 별도 함수로 분리하고자 하는 의도이실까요?
그렇다면 preprocess
, sanitize
, normalize
등의 작명도 활용하실 수 있을 것 같아요
사실상 한 줄 짜리 함수이다 보니 인라인도 충분히 괜찮지 않을까 해서 의견 드립니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네 가독성이 더 좋다고 판단해서 함수를 따로 빼봤습니다..! 항상 변수명과 함수명을 작성하는데 있어서 어려움을 느끼곤 하는데, 추천해주셔서 감사합니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰로 넘겨주셨는데 제가 확인이 조금 늦었네요!
즐거운 주말 보내시길 바랍니다~!
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.