Union Find Algorithm with quick find method impl.