본문 바로가기

Algorithm/Etc

Union find

 

make-set

 

union(x, y) = y를 x의 자손으로 넣음

 

 

 

 

 

[알고리즘] Union-Find 알고리즘 - Heee's Development Blog

Step by step goes a long way.

gmlwjd9405.github.io

 

 

weighting rule for union( i, j )

collapsing find set

'Algorithm > Etc' 카테고리의 다른 글

DP 하면서 틀리는 것 / DFS하면서 틀리는 것  (0) 2021.05.11
[DP] 부분집합의 합  (0) 2020.12.16
Graph 사이클 찾기  (0) 2020.11.14
Topology sort(위상 정렬)  (0) 2020.11.12
인접 리스트  (0) 2020.11.07