We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eadd75e commit ef8ede9Copy full SHA for ef8ede9
1 file changed
10/7.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