Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
Signed-off-by: AilinKid <[email protected]>
  • Loading branch information
AilinKid committed Jul 30, 2024
1 parent 9ba0b7c commit 045545a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/util/disjointset/int_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (m *SimpleIntSet) FindRoot(a int) int {
if a == m.parent[a] {
return a
}
// path short compression
// Path compression, which leads the time complexity to the inverse Ackermann function.
m.parent[a] = m.FindRoot(m.parent[a])
return m.parent[a]
}

0 comments on commit 045545a

Please sign in to comment.