-
Notifications
You must be signed in to change notification settings - Fork 126
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
[mallayon] Week 4 #820
[mallayon] Week 4 #820
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.
@mmyeon 님, 올 한 해 정말 고생 많으셨고, 꾸준히 참여해주셔서 감사합니다!
새해에도 복 많이 받으시고 앞으로도 완주까지 쭉 적극적인 참여 부탁드려요!
아직 풀이중이시니 코멘트만 남기고 가겠습니다~!
return nums.length; | ||
} | ||
|
||
// 공간복잡도 O(1) 개선 방법 |
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.
for문 하나로 수정했습니다!
피드백 감사합니다 👍
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.
@HC-kang
꼼꼼한 리뷰 감사합니다!
새해 복 가득가득 받으시고, 완주까지 잘 부탁드립니다 :)
missing-number/mmyeon.ts
Outdated
|
||
function missingNumber(nums: number[]): number { | ||
const map = new Map(); | ||
nums.forEach((num) => map.set(num, 1)); |
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.
어차피 값을 1로 설정한다면, Set을 썼어도 좋았을것 같습니다!
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.
Set으로 변경했습니다!
놓쳤는데 알려주셔서 감사해요 😄
* | ||
* 시간복잡도 : O(N * M * 4^L) | ||
* - L는 word의 길이, word 길이만큼 네 방향 체크하니까 O(4^L) | ||
* 공간복잡도 : O(L) |
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.
공간 복잡도에서 board
매핑을 위한 공간이 누락된것같아요!
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.
함수 인자로 받아온 board
를 따로 저장하지 않고 바로 사용해서 공간복잡도에 추가하지 않았습니다!
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.
엇, 선언하신 변수로 착각했네요 🙏
- for문 중첩 개선 - 자료구조 map에서 set으로 변경
const dummyNode = new ListNode(); | ||
let current = dummyNode; |
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.
@mmyeon 님 안녕하세요..!
꾸준히 스터디 참여해주셔서 같은 참가자로서 힘이 납니다. 감사합니다.
저도 부족하지만 의미있는 리뷰 남기도록 노력하겠습니다..!
Leetcode 풀이와는 무관하지만,,
이 부분에서 혹시 const dummyNode
와 let current
의 선언 방식이 다른 이유가 따로 있으신가요???
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.
@Chaedie 님 반갑습니다!
자바스크립트에서 재할당 여부에 따라 선언을 다르게 하고 있어요~
값이 재할당 되는 변수 : let
사용
값이 재할당 되지 않는 변수 :const
사용
current
변수의 경우, 다음 노드로 재할당 하기 위해서 let
을 사용헀습니다.
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.
이번 주 리뷰 남겨주셔서 정말 감사합니다 😄
끝까지 함께 파이팅해요 !! 새해 복 많이 받으셔요~~~~
// 홀수 회문 카운트 | ||
count += countPalindromes(s, i, i); | ||
// 짝수 회문 카운트 | ||
count += countPalindromes(s, i, i + 1); |
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.
@meoooh 님! 고생하셨습니다.
깔끔한 풀이에 설명도 잘 해 주셔서 보기 너무 좋았어요.
앞으로도 많은 참여 부탁드릴게요!
* | ||
* 시간복잡도 : O(N * M * 4^L) | ||
* - L는 word의 길이, word 길이만큼 네 방향 체크하니까 O(4^L) | ||
* 공간복잡도 : O(L) |
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
로 설정해주세요.