We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd8c48a commit 8c89847Copy full SHA for 8c89847
10/3.py
@@ -2,7 +2,7 @@
2
def find_parent(parent, x):
3
# 루트 노드가 아니라면, 루트 노드를 찾을 때까지 재귀적으로 호출
4
if parent[x] != x:
5
- parent[x] = find_parent(parent, parent[x])
+ parent[x] = find_parent(parent, parent[x])
6
return parent[x]
7
8
# 두 원소가 속한 집합을 합치기
0 commit comments