-
Notifications
You must be signed in to change notification settings - Fork 9
김현정 / 17주차 #25
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
base: main
Are you sure you want to change the base?
김현정 / 17주차 #25
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.
수고하셨습니다. 리뷰가 많이 늦었네요 죄송해요 🥲
const graph = input.slice(1).map((el) => el.split(" ").map(Number)) | ||
|
||
const solution = (n, graph) => { | ||
const result = [...Array(n)].map(() => Array(n).fill(0)) // 답을 저장할 2차원 배열 |
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차원 배열을 생성할 수 있군요...!
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.
이번 주도 수고 많으셨습니다! 😊
const solution = (n) => { | ||
let A = new Array(n + 1).fill(0) | ||
|
||
for (let i = 2; i <= n; i++) { |
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.
이 부분 코드가 정말 깔끔한 것 같아요. 미리 A[i]에 할당해두고 비교하니 훨씬 가독성이 좋네요!
No description provided.