MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / find

Method find

java/0721-accounts-merge.java:53–57  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

51 }
52
53 public int find(int x) {
54 if (parent[x] != x)
55 parent[x] = find(parent[x]);
56 return parent[x];
57 }
58
59 // Union By Rank
60

Callers 4

accountsMergeMethod · 0.95
unionMethod · 0.95
updateSiteData.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected