Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
간선이 가장 적게 하여 모든 정점을 탐색하는 알고리즘 >> 방향과 가중치가 없는 크루스칼 알고리즘 구현
1-1. int v 정점의 수, parents[v+1] 배열 생성
1-2. initGraph(int v) 함수 : parents[v+1]의 각각의 값에 자기 자신 입력
1-3. find 함수 : 정점의 부모를 찾아서 자기 자신이면 return하고, 아니면 그 부모의 부모를 찾는 재귀함수
1-4. union 함수 : find로 정점의 부모를 찾아서 서로 같으면 -1을 리턴하고, 서로 다를 때 더 작은 수를 공통부모로 만드는 함수. 부모가 된 수를 리턴