For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quick Find - Lazy Approach

Quick Union - Lazy Approach

Integer array id[] of length N.

Interpretation: id[i] is parent of i.

Root of i is id[id[id[...id[i]...]]].

Afterunion(3,5)

Java Implementation

Last updated