The following two arrays are used to implement disjoset data structure . arr [ ] holds the parent nodes while rank array holds the rank of subset
arr = [ None ] * n NEW_LINE rank = [ None ] * n NEW_LINE