Done the weighted union-find

data structrue: array;
algorithm: quick-union;
key words: weighted, path compression;
Everything is a tree