MCPcopy Create free account
hub / github.com/algorithm004-01/algorithm004-01 / findRoot

Method findRoot

Week 06/id_566/leetcode_547_566.py:34–42  ·  view source on GitHub ↗

:num:某个小朋友 :parent:多个集合树 一直找到这个小朋友所在集合的代表,即树根

(self, num, parent)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

unionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected