There are a set of elements S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Here there are 10 elements (N = 10). An array arr to manage the connectivity of the elements. Arr[ ] that is indexed by elements of sets, which are of size N (as N elements in set), used to manage the operations of union and find.
What I cant understand is how are the elements selected to start with union operation? In this Link(mentioned above) the union has started with (2,1) , can I use any two elements? say (1,8)? I don't seem to get the same tree as explained in the image if I start with selecting different elements(other than Union(2,1)).