-
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
[Zioq] Week2 #745
[Zioq] Week2 #745
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.
2주차도 수고 많으셨습니다 번거로우시겠지만 시간복잡도와 공간복잡도 계산이 어떻게 이루어졌는지 표기해주시면 도움이 될 것 같습니다 화이팅
let a = 0; | ||
let b = 1; | ||
let c = 0; |
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 (let c of s) { | ||
map[c] = (map[c] || 0) + 1; | ||
} | ||
|
||
for (let c of t) { | ||
if (!map[c]) return false; | ||
map[c]--; | ||
} |
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.
변수 c
가 불변이라면 let 대신에 const 사용하시는것도 좋을 것 같습니다. for (const c of s)
ref) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.