title: In Java implementation of Kruskal's algorithm where exactly should we perform Path Compression?
body: <p>While implementing Kruskal's algo in Java using Disjoint sets, should we call path-compression as separate funtion or it should be integral part of the find() funtion?</p>