Skip to content

Conversation

@LeeSongMi
Copy link
Collaborator

관련 이슈

#16

작업 내용

크루스칼 알고리즘을 이용해 별과 별 사이를 연결하고, 그 과정에서 발생하는 최소 비용을 구한다.
노드의 부모노드(루트노드)를 찾는 find 함수,
노드와 노드 사이의 간선을 연결해주는 union 함수,
노드 사이의 거리를 구해 비용을 리턴해주는 getDistance 함수를 제작하고,
최소 비용순으로 하나씩 별들을 연결하면서 최소 비용을 찾는다.

문제 요약

[백준] 4386번 별자리 만들기

  • N개의 별을 이어서 하나의 별자리를 만들어라.
  • 이때, 두 별 사이의 거리만큼 비용이 발생하며, 최소 비용을 구해라.

@LeeSongMi LeeSongMi requested a review from dev-hjJoo May 18, 2025 16:09
@LeeSongMi LeeSongMi self-assigned this May 18, 2025
@LeeSongMi LeeSongMi added the enhancement New feature or request label May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant