Skip to content

Conversation

@saechimdaeki
Copy link
Contributor

📘 풀이한 문제

⭐ 문제에서 주로 사용한 알고리즘
  • 유니온-파인드

📜 대략적인 코드 설명
  • 크루스칼과 굉장히 비슷하면서도 다른..?
    빈 그래프에 무거운 간선부터 생성해나아가면서 parent가 달랐다면 이어지기전에 계산해 구합니다. 이어지기 전에 계산해 구한합은 즉 , A집합* B집합 *(모든가중치간선합 - 현재 이어진 가중치간선합)

말로설명하는게 굉장히 어려워서 타블로그에서 정리되어있는 그림을 퍼왔습니다

1

p.s. 합치는 배열은 Long타입이어야합니당..

@ChanhuiSeok ChanhuiSeok merged commit 87b3fad into CodeTest-StudyGroup:master Oct 8, 2020
@ChanhuiSeok ChanhuiSeok added the problem-solved Indication that this problem is solved label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

problem-solved Indication that this problem is solved

2 participants