Skip to content

김현정 / 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

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Conversation

sena-22
Copy link
Contributor

@sena-22 sena-22 commented Apr 6, 2023

No description provided.

Copy link
Contributor

@jee-woo jee-woo left a 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차원 배열
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런식으로 2차원 배열을 생성할 수 있군요...!

Copy link
Contributor

@jee-woo jee-woo left a 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++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 코드가 정말 깔끔한 것 같아요. 미리 A[i]에 할당해두고 비교하니 훨씬 가독성이 좋네요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants