Skip to content

Conversation

@ganeodolu
Copy link

@ganeodolu ganeodolu commented Nov 28, 2021

[9주차][최단 경로][호준] 학습하고 있는 내용 정리

주차 알고리즘 정리한 내용 링크
9주차 최단경로 이론 정리 링크
9주차 최단경로 기출 문제 풀이 링크

Comment on lines +8 to +11
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cities.forEach(
([start, end, cost]) =>
graph[start - 1][end - 1] > cost && (graph[start - 1][end - 1] = cost)
);
cities
.filter((start, end, cost]) => graph[start - 1][end - 1] > cost)
.forEach( (start, end, cost]) => (graph[start - 1][end - 1] = cost));
for(const [start, end, cost] of cities) {
  if([start - 1][end - 1] > cost)
    graph[start - 1][end - 1] = cost;
}

Copy link
Author

Choose a reason for hiding this comment

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

언제나 고칠점을 발견해주셔서 감사합니다!!

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