-
Notifications
You must be signed in to change notification settings - Fork 116
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
[선재] WEEK07 문제풀이 #493
[선재] WEEK07 문제풀이 #493
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.
brainstorming 을 작성해주셔서 코드를 읽는 데 도움이 되었습니다!
이번 한 주도 고생많으셨습니다!
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.
이번 한 주도 고생많으셨어요 @Sunjae95 님!
항상 코드 잘 보고 있습니다!
*/ | ||
var setZeroes = function (matrix) { | ||
const stack = []; | ||
const memo = { row: new Set(), column: new 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.
stack이나 memo중 하나만 사용하셨어도 되지 않았을까요? 최적화를 위해 두 가지를 모두 사용하신걸까요?
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.
맞아요. 동일한 크기인 matrix를 만들어서 memo를 활용하는 방법도 가능하나, stack이나 queue와 같이 0인지점을 저장하고 모두 소모하는 방식이 조금이라도 공간을 덜 사용하지 않을까 싶어서 선택했어요.
reverse-linked-list/sunjae95.js
Outdated
var reverseList = function (head) { | ||
let answer = null; | ||
|
||
const search = (target) => { |
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.
search
라는 함수 네이밍은 추후 오해의 소지가 있지 않을까 싶어요.
buildReverseList
등이 좀 더 명확하게 내부 구현을 표현하지 않을까요?
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.
오 reverseList 단어가 들어가니 더 명시적이네요! 변수명이 제일어렵네요 😂
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.